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

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

 



>Like I said in another response to this question: "...if there is some 
>complex structure (edit: like in a .NET service using doc/literal 
>encoding of the body) I would typically add some convenient access 
>methods on the data classes used in the classmap."
>
>This is what I do talking with .NET services:
>
>class SomeResponse {
>
> public $SomeResult; // this is the root noe of the XML body
>
How do I get this xml result? Is the only way using __getLastResponse() ? 

If so, simplexml_load_string seems to be choking on the name space in my
lastResponse. When I took the namespace attributes out of the envelope element
it returned a populated simplexml object, before that it returned an empty
object.

Thanks so much.
 
> public function getStatus() {
>   $xml = new SimpleXMLElement($this->SomeResult->any); // load the 
>element you need
>   return (int)$xml->STATUSINFO->STATUS; // use SimpleXML to find the 
>right element
> }
>}
>
>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