![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| "Marcel" <neegeenspam@hotentottententententoonstellingen.nl > wrote in message news:<3f4358a5$0$146$edd6591c@news.versatel.net>.. . > > I am newbee to SOAP... i downloaded the NUSOAP files from > http://dietrich.ganx4.com/nusoap/ > > I tried the example at http://dietrich.ganx4.com/nusoap/faq.php The page you are referring to has TWO examples, a provider and a client. Did you deployed them both, each in a separate file? > but this does not seem to work How exactly does it not work? Please post your code and any error messages you get. Also, try Dietrich's debugging code: echo 'Request: <xmp>' . $soapclient->request . '</xmp>'; echo 'Response: <xmp>' . $soapclient->response . '</xmp>'; echo 'Debug log: <pre>' . $soapclient->debug_str . '</pre>'; > Do i have to install special modules or configure IIS before > getting things to work???? No, it should work right off the bat... Allow_url_open must be on, but these days very few people have it off... Cheers, NC | |||
| Advertisements |
| | #2 | ||
| "Nikolai Chuvakhin" <nc@iname.com> schreef in bericht news:32d7a63c.0308201816.1a4c0bba@posting.google.c om... > "Marcel" <neegeenspam@hotentottententententoonstellingen.nl > > wrote in message news:<3f4358a5$0$146$edd6591c@news.versatel.net>.. . > > > > I am newbee to SOAP... i downloaded the NUSOAP files from > > http://dietrich.ganx4.com/nusoap/ > > > > I tried the example at http://dietrich.ganx4.com/nusoap/faq.php > > The page you are referring to has TWO examples, a provider and a client. > Did you deployed them both, each in a separate file? > > > but this does not seem to work > > How exactly does it not work? Please post your code and any error > messages you get. Also, try Dietrich's debugging code: > > echo 'Request: <xmp>' . $soapclient->request . '</xmp>'; > echo 'Response: <xmp>' . $soapclient->response . '</xmp>'; > echo 'Debug log: <pre>' . $soapclient->debug_str . '</pre>'; > > > Do i have to install special modules or configure IIS before > > getting things to work???? > > No, it should work right off the bat... Allow_url_open must be on, > but these days very few people have it off... > > Cheers, > NC NC, Thanks for your answer, I succeed making the basic examples work! Thanks for the debug-code. It will help me a lot. Now i am jumping into real complicated NUSOAP things: The project consists of users who have a SOAP enabled software-application on theirs PC's and this software should communicate with my SOAP Server... So i am at the start now: To simulate what the client (the application installed on the users PC's) will send i made the next PHP code: CLIENT: ########################## <?php require_once("nusoap.php"); $soapclient = new soapclient('http://www.myserver.com/soap/gibserver.php'); $soap_call = ""; $soap_call .= "<?xml version=\"1.0\"?>\r\n"; $soap_call .= "<SOAP-ENV:Envelope\r\n"; $soap_call .= "xmlns OAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\"\r\n";$soap_call .= "xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\r\n"; $soap_call .= "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n"; $soap_call .= "<SOAP-ENV:Body>\r\n"; $soap_call .= "<geefSjabloon xmlns=\"http://gib.nl/ws/gib\">\r\n"; $soap_call .= "<geefSjabloonVraag>\r\n"; $soap_call .= "<procesInfo>\r\n"; $soap_call .= "<functie>\r\n"; $soap_call .= "<productId>020</productId>\r\n"; $soap_call .= "<contextId>200</contextId>\r\n"; $soap_call .= "<functieId>2000</functieId>\r\n"; $soap_call .= "</functie>\r\n"; $soap_call .= "</procesInfo>\r\n"; $soap_call .= "</geefSjabloonVraag>\r\n"; $soap_call .= "</geefSjabloon>\r\n"; $soap_call .= "</SOAP-ENV:Body>\r\n"; $soap_call .= "</SOAP-ENV:Envelope"; $soapclient->send($soap_call); ?> <HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <?php echo 'Request: <xmp>' . $soapclient->request . '</xmp>'; echo 'Response: <xmp>' . $soapclient->response . '</xmp>'; echo 'Debug log: <pre>' . $soapclient->debug_str . '</pre>'; ?> </BODY> </HTML> ############################# SERVER: ############################# require_once("nusoap.php"); $s = new soap_server; $s->service($HTTP_RAW_POST_DATA); ############################# OUTPUT IN BROWSER (IN DEBUGGING MODE): ############################# Request: POST /soap/gibserver.php HTTP/1.0 User-Agent: NuSOAP/0.6.3 Host: www.myserver.com Content-Type: text/xml; charset=ISO-8859-1 Content-Length: 500 SOAPAction: "" <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns OAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <SOAP-ENV:Body> <geefSjabloon xmlns="http://gib.nl/ws/gib"> <geefSjabloonVraag> <procesInfo> <functie> <productId>020</productId> <contextId>200</contextId> <functieId>2000</functieId> </functie> </procesInfo> </geefSjabloonVraag> </geefSjabloon> </SOAP-ENV:Body> </SOAP-ENV:Envelope Response: HTTP/1.1 500 Internal Server Error Server: Microsoft-IIS/5.0 Date: Thu, 21 Aug 2003 08:37:12 GMT X-Powered-By: PHP/4.3.0 Server: NuSOAP Server v0.6.3 Connection: Close Content-Type: text/xml; charset=UTF-8 Content-Length: 934 <?xml version="1.0"?> <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns OAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns OAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"xmlns:si="http://soapinterop.org/xsd"> <SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>Server</faultcode><faultactor>meth od '' not defined in service ''</faultactor><faultstring></faultstring><detail><soapVal xsi:type="xsd:string"></soapVal></detail></SOAP-ENV:Fault></SOAP-ENV:Body></ SOAP-ENV:Envelope><!-- soap_server: entering parseRequest() on 10:37 2003-08-21 soap_server: method name: soap_server: method '' not found! soap_server: parser debug: soap_parser: Entering soap_parser() soap_parser: parse error: XML error on line 6: not well-formed (invalid token) soap_server: server sending... --> Debug log: soapclient: transporting via HTTP soapclient: sending message, length: 500 soapclient: transport debug data... soap_transport_http: scheme = http soap_transport_http: host = www.myserver.com soap_transport_http: path = /soap/gibserver.php soap_transport_http: entered send() with data of length: 500 soap_transport_http: connection params: www.myserver.com, 80 soap_transport_http: socket connected soap_transport_http: wrote data to socket soap_transport_http: received 1170 bytes of data from server soap_transport_http: closed socket soap_transport_http: received incoming payload: 1170 soap_transport_http: found proper separation of headers and document soap_transport_http: cleaned data, stringlen: 942 soap_transport_http: end of send() soapclient: got response, length: 942 soapclient: Entering parseResponse(), about to create soap_parser instance soapclient: soap_parser: Entering soap_parser() soap_parser: found root struct Fault, pos 2 soap_parser: adding data for scalar value faultcode of value Server soap_parser: adding data for scalar value faultactor of value method '' not defined in service '' soap_parser: adding data for scalar value faultstring of value soap_parser: adding data for scalar value soapVal of value soap_parser: inside buildVal() for detail(pos 6) of type soap_parser: inside buildVal() for Fault(pos 2) of type struct soap_parser: parsed successfully, found root struct: 2 of name Fault ################################################## ######## Some questions i have right now are: How to send the SOAPAction with the request? How to read value of <productId>, <contextId> and <functieId> out of the request? Regards, Marcello | |||
| | #3 | ||
| "Marcel" <neegeenspam@hotentottententententoonstellingen.nl > wrote in message news:<3f448a19$0$155$edd6591c@news.versatel.net>.. . > > To simulate what the client (the application installed on the > users PC's) will send i made the next PHP code: I have two problems with this. First, your XML is not well-formed. In particular, the "SOAP-ENV:Envelope" tags are not closed. Right now, your XML looks like this: <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns OAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <SOAP-ENV:Body> <geefSjabloon xmlns="http://gib.nl/ws/gib"> <geefSjabloonVraag> <procesInfo> <functie> <productId>020</productId> <contextId>200</contextId> <functieId>2000</functieId> </functie> </procesInfo> </geefSjabloonVraag> </geefSjabloon> </SOAP-ENV:Body> </SOAP-ENV:Envelope To bring it to well-formed XML, you need to add a couple of >'s (one at the end of the fifth line, the other an the end of the last line): <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns OAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SOAP-ENV:Body> <geefSjabloon xmlns="http://gib.nl/ws/gib"> <geefSjabloonVraag> <procesInfo> <functie> <productId>020</productId> <contextId>200</contextId> <functieId>2000</functieId> </functie> </procesInfo> </geefSjabloonVraag> </geefSjabloon> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Second, you seem to be sending a SOAP message into nowhere: $soapclient->send($soap_call); Here is the syntax for soapclient::send method: public mixed send (string $msg, [string $soapaction, integer $timeout]) The second argument defines to which method the message is being sent. Since you don't set it, the provider decides that the message is being sent to a method named '' (empty string), tries to find this method, fails, and returns you an error message saying: soap_server: method '' not found! It's right there in the output you sent me... So it seems that you are sending bad messages to non-exitsing recipients... Cheers, NC | |||
| Featured Websites | ||||
|
![]() |
| Tags: 2000, iis, nusoap, server, win |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP on IIS Windows 2000 Server | Frank | PHP | 2 | 07-01-2007 3:50 PM |
| XP 2000+ | Umesh Chapaneri | Central Processing Unit (CPU) and Overclocking | 4 | 06-18-2007 10:46 AM |
| Athlon xp 2000+ | Tomasz Malerczyk | Central Processing Unit (CPU) and Overclocking | 0 | 06-17-2007 9:03 PM |
| camera raw and jpg 2000 | Eric Gill | Graphics in general | 1 | 06-11-2007 10:34 PM |
| Featured Websites | ||||
|