Re: [SOAP] Talking to SOAP::Lite
| From: | Shane Caraveo | Date: | Mon, 05 Aug 2002 02:56:56 +0000 |
| Subject: | Re: [SOAP] Talking to SOAP::Lite | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-212@lists.php.net to get a copy of this message | ||
Or, it could be fixed in the server code itself. You need to use a data class to correctly set the name to result. Since you didn't, soap::lite generates names for you, thus the s-gensym3 element name.
Shane
Brad LaFountain wrote:
Well since you are using a wsdl.. php-soap becomes "strict" meaning it is looking for certin types and names. Your wsdl defines the response node is going to be named "Result". Meaning your response should be: <namesp1:TranslateResponse xmlns:namesp1="urn:Urdu::SOAP"><Result xsi:type="xsd:string">Urdu aik zabardast zabaan hai</Result></namesp1:TranslateResponse> So its looking for the Result tag and its not finding it becuase 's-gensym3' is there instead. I plan on implmenting a "strict" mode in php-soap meaning if you are running in strict mode you will get that error. If you aren't then it would accecpt it anyways. To get around that in the meantime. Don't use a wsdl. $s = new SoapObject(http://apniurdu.com/SOAP/SOAP.pl', 'urn:Urdu::SOAP'); $res = $s -> Translate ( 'Urdu is a great language' ); var_dump ($s); echo "\n\n\n"; var_dump ($res); -brad --- Faisal Nasim <faisal@nasim.org> wrote:Hi, I have been trying to talk to a SOAP::Lite server using php-soap (version: 0.1.2) After commenting line #411 (Can't find response paramater....) in php_http.c, I managed to get a little further. Otherwise, it would bail out with this message: Fatal error: Can't find response parameter "Result" The simple program is: <? $s = new SoapObject('http://urdu.local/SOAP/Urdu2Local.wsdl'); //// DOESN'T WORK... why not? //$var = new SoapVar ( 'Urdu is a great language' , XSD_STRING ); //$res = $s->Translate ( $var ); $res = $s -> Translate ( 'Urdu is a great language' ); var_dump ($s); echo "\n\n\n"; var_dump ($res); ?> <OUTPUT> <<<<CUT>>>> ["__last_response"]=> string(552) " <<<<CUT>>>> <SOAP-ENV:Body><namesp1:TranslateResponse xmlns:namesp1="urn:Urdu::SOAP"><s-gensym3 xsi:type="xsd:string">Urdu aik zabardast zabaanhai</s-gensym3></namesp1:TranslateResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>"} NULL </OUTPUT> WSDL URL: http://apniurdu.com/SOAP/Urdu2.wsdl 'Urdu aik zabardast zabaan hai' is what I am looking for and it is present in that SOAP envelope! How do I access it? $res is NULL. It works absolutely fine with SOAP::Lite (Perl) and Microsoft's SOAP client (VB). Thank you! Faisal Nasim Pakistan -- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php__________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com