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

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

 



The response XML exists, it's just being umarshalled into an object for you by the PHP SoapClient implementation, because that's its job.  If you want the SoapEnvelope XML, you can get it after you call $client->foo() by for example $client->__getLastResponse().

http://www.php.net/manual/en/function.soap-soapclient-getlastresponse.php

-----Original Message-----
From: Claus Jørgensen [mailto:thedeathart@gmail.com] 
Sent: Thursday, January 18, 2007 1:59 PM
To: soap@lists.php.net
Subject: Re:  soapclient method to .net server returns object not xml

Hi

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.

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 = 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 = new SoapClient("http://foo.asmx?WSDL";, array('encoding' => 
> '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
>
>


--
Sincerely
  Claus Jørgensen, Denmark
  Tlf: +45 86 54 19 07
  Mobil: +45 30 13 27 32

-- 
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