Re: soapclient method to .net server returns object not xml

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




knut.urdalen@gmail.com (Knut Urdalen) wrote:
>Try:
>
>$client = new SoapClient("http://foo.asmx?WSDL";);
>var_dump($client->foo());
>
>and you'll see the result.
Yes, I see the object. 

What seems to have gotten me confused as I was looking at another soapclient
call to a different service/method  and it returned xml...

>
>If you want to have a look at the actual SOAP messages you should either 
>add 'trace' => 1 in the options-array to the SoapClient constructor and 
>call:
>
>echo $client->__getLastRequest();
>echo $client->__getLastResponse();
Thank you, that works well for me.
>
>Or simply use the ngrep tool.
>
>If you want to get the class names right for the return values you need 
>to use the classmap option. wsdl2php can help you with that ;)
>
Oh yeah! wsdl2php cleared what would have been my next stumbling block. Thank
you so much. I am in business  .

Now, if I understand it correctly, I need to parse the StdClass objects that
come back from a soapclient/method call.

Are there any special scripts/functions to parse them, other than looping
through with foreach?

Any crumbs of knowledge and wisdom would be so welcome. 

>>I have been trying something like this:
>>$client = new SoapClient("http://foo.asmx?WSDL";, array('encoding' =>
>>'literal'));
>>
>>But I get an invalid encoding error.
>>  
>>
>It's correct that .NET uses the doc/literal message encoding, but the 
>'encoding' option in SoapClient is related to the charset encoding.
>
>If you read the manual you see that you should use 'style' => 
>SOAP_DOCUMENT, 'use' => SOAP_LITERAL to use doc/literal with ext/soap.
>
>See http://no.php.net/manual/en/function.soap-soapclient-construct.php 
>for all options.
>
>Best regards,
>Knut Urdalen
>http://www.urdalen.com

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux