Roland Cruse wrote:
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.
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
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