Re: [SOAP] soapclient method to .net server returns object not xml
| From: | (Roland Cruse) | Date: | Mon, 22 Jan 2007 21:34:24 +0000 |
| Subject: | Re: [SOAP] soapclient method to .net server returns object not xml | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2445@lists.php.net to get a copy of this message | ||
>
>If you want XML, aren't it a REST service you're trying to create?
>SOAPClient was designed to return a stdObject , not a xml document.
>
Thanks.
I am only a php SOAPClient accessing a .net soap server.
From other postings I understand that soapclient is meant to return an object.
That works for me in some instances. Knut Urdalen's wsdl2php has been a great
help. But in an other method, which returns a large multidimensional data set,
I think it would be better to get the result in xml to feed to simpleXml which
would then be easier to work with and would not need parsing.
I also have php ext/soap code calling a different service other than the one I
am using and this method called returns *xml*. A while back I made requests to
a soap server in the form of a post in a web form with the complete soap
request inside the "textarea", that also returned xml. But then I am hearing
knowledgeable people say I am supposed to work with the object that the
soapclient returns.
Knowing no other way to get xml from a soapclient method call I saved the
output of __getLastReponseHeaders and __getLastReponse into a string/file
(both ways) and tried loading them into simpleXml but I get an empty object on
return (testing the same operation with good xml gives a positive result).
Head spinning. Can anyone point me some tips?
Thanks
>2007/1/18, Roland <roland.cruse@vrs-soft.com>:
>>
>> Hi
>>
>> I am new to soap and maybe I am missing something. Using php ext/soap
>> calling
>> a .net server.
>>
>> $client =3D new
>> SoapClient("http://foo.asmx?WSDL");
>> echo $client->foo();
>>
>> Returns an stdObject when I want xml. If I call the same url not using
>> soap I
>> do get xml.
>>
>> I have been trying something like this:
>> $client =3D new SoapClient("http://foo.asmx?WSDL",Ò3¯Dš
>> ÷�.óͰ¥�c array('encoding' =3D>
>> 'literal'));
>>
>> But I get an invalid encoding error.
>>
>> I do not know how many web pages I have looked at trying to figure this
>> out.
>>
>> Any help would be so welcome
>>
>> --
>> PHP Soap Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>--=20
>Sincerely
> Claus J=F8rgensen, Denmark
> Tlf: +45 86 54 19 07
> Mobil: +45 30 13 27 32
>
>------=_Part_163693_1325884.1169157550884--