PHP & SOAP

Discussion about Schedules Direct grabber code and data formats.
Post Reply
rgoolsby
Posts: 1
Joined: Mon Apr 05, 2010 6:54 am

PHP & SOAP

Post by rgoolsby »

Alright... I have experience in PHP and little to none is SOAP.

I can get the sample code working great on my server and I can see the data being returned.

My issue is parsing the data. Its a SOAP object that is returned, correct?
Is it possible to either request XML format or convert the SOAP object to XML?

What is the preferred way to parse the SOAP object?

Thanks in advance...

rmeden
SD Board Member
Posts: 1527
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: PHP & SOAP

Post by rmeden »

I use the SoapClient class and the results are already parsed.

print_r is your friend here :)

Here's a snippit of my download test code
$data = $client->download($start,$stop);
if ( count($data->xtvd->schedules->schedule) > $data_limit ) .....

Robert

wardeworth
Posts: 3
Joined: Fri Apr 09, 2010 11:42 pm

Re: PHP & SOAP

Post by wardeworth »

Parsing is the process of deserialization. If you use binary fix sized structures, you do not need to do any parsing what so ever - you just dump the binary data into the relevant structure. You just need to know how to parse the SOAP message returned by the web service when the return type is an object represented by an xml structure. A tool like TcpTunnelGui will help you to understand the structure of the return message.
iedge

rmeden
SD Board Member
Posts: 1527
Joined: Tue Aug 14, 2007 2:31 pm
Location: Cedar Hill, TX
Contact:

Re: PHP & SOAP

Post by rmeden »

our data isn't binary... it's text

Post Reply