Re: [SOAP] Help with Soap Client
| From: | Roger Roelofs | Date: | Sun, 19 Apr 2009 22:20:35 +0000 |
| Subject: | Re: [SOAP] Help with Soap Client | ||
| References: | 1 2 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-2922@lists.php.net to get a copy of this message | ||
Tom,
On 04/19/2009 12:58 PM, EPA WC wrote:
Now I can get the soap response back with the following code, but my new problem is how I can parse out information from returned stdClass Object. Originally I thought about using simplexml to get what I need, but it didn't work since the returned results are in stdClass Objects. I also listed the response I got from this code. No parsing is required. That's kind of the point of using the soap client. You get back a php object with all the data you would normaly have to parse out of the xml yourself. For example, to display the organization names in a list, you just walk the arrayfor ( $i=0; $i < count($stresults->Organization); $i++ ) {
echo $stresults->Organization[$i]->OrganizationDescription->OrganizationFormalName;} Make sense? Roger -- Roger Roelofs Datacomp Appraisal Services rer@datacompusa.com