If you use getLastResponse(), you will have a string in
You have to load this string in a DOMDocument object. You can then
either do $domdocument->getElementsByTagName(‘return’), or if it’s
a more complex return document, you can create a DOMXpath object to query the
DOMDocument. You can then use XPath to query for the node you need.
Now – if you use a classmap in the Zend_Soap_Client –$response
will be an object as defined in the WSDL file of the soap server. Of course you
need every complex object in the WSDL schema in your classmap.
If you don’t use a classmap, this will be a StdClass
object. You should be able to navigate through this object like this:
$returnvalue = $response->someNode->return; (or wherever
the return node is)
From: Jigal sanders
[mailto:[hidden email]] Sent: dinsdag 25 november 2008 13:37 To:[hidden email] Subject: [fw-webservices] Read the contents of an xml
I use Zend_Soap_Client to comunicate with a webservice.
I have $response = $this->client->getlastResponse();
This gives me an xml file with the response. How can i read a node from this
How can I get the contents of the node <return>123</return>?
Thanks in advance
found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.175 / Virus Database: 270.9.9/1808 - Release Date: 24/11/2008