accessing the results returned from webservice

From: Date: Wed, 07 Jan 2009 16:47:22 +0000
Subject: accessing the results returned from webservice
Groups: php.soap 
Request: Send a blank email to php-soap+get-2874@lists.php.net to get a copy of this message
Hello all, I have been trying for the last few days to access the data returned from webservice. I am new to php, so be patient. Now, My understanding is the return from a _soapCall is an associative array. Which means I don't have to use xml or xpath to access the values. Insead, I can do something like: val = result['theNameOfTheRootTag']['aChildTag'] I have been trying this but no luck. the documentation for this method is at http://php.net/function.soap-soapclient-soapcall and at the end of the page, there are some posts that address this issue. However, I have tried all of them and none worked for me. The format for the output is similar to: <response> <custId>1</custId> <authId>123</authId> <authApproved>0</authApproved> <custName>Someone</custName> </response> the code is like: results = **__soapCall ('getAuth' , $wsdl_url ) ; customer = $result['response']['custName'] ; This is not working. When I print this variable I get an empty value. Again, the docs says that it returns associative array in this case. Can anyone point me in the right direction ? Thank you in advance. **

« previous php.soap (#2874) next »