Parsing SOAP response

Web hosting discussion, programming, and shared and dedicated servers.
2 posts Page 1 of 1
by Steve Kucera » Mon May 20, 2013 5:49 pm
Hello,

I am working on a project and I need to parse the repsonse object from a SOAP request. I am successfully making the call and getting the following object from this response:

$response = $result->GetOrderListRecentResult;
var_dump($response); )

THIS IS THE OBJECT PER THE var_dump COMMAND

object(stdClass)#4 (1) {
["OrderList"]=>
array(3) {
[0]=>
object(stdClass)#5 (5) {
["RequestID"]=>
int(0)
["Success"]=>
int(1)
["OrderID"]=>
int(11510)
["CreatedDate"]=>
string(22) "2013-05-20T19:03:17.19"
["LastModifiedDate"]=>
string(23) "2013-05-20T19:03:17.377"
}
[1]=>
object(stdClass)#6 (5) {
["RequestID"]=>
int(0)
["Success"]=>
int(1)
["OrderID"]=>
int(11509)
["CreatedDate"]=>
string(22) "2013-05-20T18:11:17.08"
["LastModifiedDate"]=>
string(23) "2013-05-20T18:11:17.213"
}
[2]=>
object(stdClass)#7 (5) {
["RequestID"]=>
int(0)
["Success"]=>
int(1)
["OrderID"]=>
int(11508)
["CreatedDate"]=>
string(23) "2013-05-20T18:00:43.457"
["LastModifiedDate"]=>
string(22) "2013-05-20T18:00:43.58"
}
}
}


What I need to do is extract the OrderID(s) from the object to insert them into a database. I know the MYSQL end of things but am pretty new at handling data objects. The scripting is written in PHP.

Thanks for any help.
by Steve Kucera » Tue May 21, 2013 3:13 pm
Problem solved.
2 posts Page 1 of 1

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 999 on Mon May 10, 2021 1:02 am

Users browsing this forum: No registered users and 1 guest