Re: Help with Soap Client

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

 



Thanks Roger. Yes I figured it out too once I changed my mindset from
simplexml to object. But I'd like to see some generic code that can
take xml schema and extract data needed from soap response objects.

Tom

On Sun, Apr 19, 2009 at 6:20 PM, Roger Roelofs <rer@datacompusa.com> wrote:
> 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 array
>
> for ( $i=0; $i < count($stresults->Organization); $i++ ) {
>    echo
> $stresults->Organization[$i]->OrganizationDescription->OrganizationFormalName;
> }
>
> Make sense?
>
> Roger
> --
> Roger Roelofs
> Datacomp Appraisal Services
> rer@datacompusa.com
>
>
> --
> PHP Soap Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
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