Convert SOAP XML response into PHP Array

Hi, I have to interact with a web service using PHP, XML and SOAP.

I am getting a response from the web server but have limited XML and SOAP experience along with limited time. I know the solution should be relatively simple, just don't have the expertise.

Web Service request is provided, just need help managing the response so I can make use of it in php. Will provide full code when project is awarded.

simplified version of PHP based request is:

$soapUrl = "[login to view URL]";

$xml_post_string = '<soapenv:Envelope xmlns:soapenv="[login to view URL]" xmlns:tem="[login to view URL]">










$headers = array(

"Content-type: text/xml;charset=\"utf-8\"",

"Accept: text/xml",

"Cache-Control: no-cache",

"Pragma: no-cache",

"SOAPAction: [login to view URL]",

"Content-length: ".strlen($xml_post_string),


$url = $soapUrl;

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

$response = curl_exec($ch);

echo $response;

A small snippet of the response is below, there are more fields but have included only a few for the example:

<s:Envelope xmlns:s="[login to view URL]">


<DownloadLoadPlansResponse xmlns="[login to view URL]">

<DownloadLoadPlansResult xmlns:a="[login to view URL]" xmlns:i="[login to view URL]">

<a:AdditionalDetails i:nil="true"/>





&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;LXML messages="1" batchseq="80" created="2021.May.11 AD 10:50 AM"&gt;

&lt;ShipperLoadPlan CreateDate="05/11/2021 10:48:33.075" ExecutionEvent="Accepted Load Modified" ExecutionEventID="AM"&gt;&lt;LoadNumber&gt;54310410&lt;/LoadNumber&gt;&lt;lLoadID&gt;54310410&lt;/lLoadID&gt;&lt;/ShipperLoadPlan&gt;&lt;/LXML&gt;






&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;LXML messages="1" batchseq="81" created="2021.May.11 AD 10:50 AM"&gt;

&lt;ShipperLoadPlan CreateDate="05/12/2021 10:48:33.075" ExecutionEvent="Accepted Load Modified" ExecutionEventID="AM"&gt;&lt;LoadNumber&gt;54310411&lt;/LoadNumber&gt;&lt;lLoadID&gt;54310411&lt;/lLoadID&gt;&lt;/ShipperLoadPlan&gt;&lt;/LXML&gt;






&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;LXML messages="1" batchseq="82" created="2021.May.11 AD 10:50 AM"&gt;

&lt;ShipperLoadPlan CreateDate="05/13/2021 10:48:33.075" ExecutionEvent="Accepted Load Modified" ExecutionEventID="AM"&gt;&lt;LoadNumber&gt;54310412&lt;/LoadNumber&gt;&lt;lLoadID&gt;54310412&lt;/lLoadID&gt;&lt;/ShipperLoadPlan&gt;&lt;/LXML&gt;









Skills: PHP, XML

See more: classic asp parse soap xml response, convert text xml php, javascript xml response array, php post xml response, php xml response remote server, parse xml response php, build xml response php, php http request xml response, soap xml response net, php code to send email using smtp server, php parse soap xml to array, convert soap xml to rest json, convert soap response to xml c#

About the Employer:
( 3 reviews ) Thornville, South Africa

Project ID: #30197324

Awarded to:


Hi, I hope you are fine. I am a software engineer. And I have 5+ years of experience with Web and Mobile App development. Complete a lot of jobs on Freelancer with highly satisfied clients. I've gone through your proje More

$20 USD in 1 day
(4 Reviews)

3 freelancers are bidding on average $22 for this job

(79 Reviews)

Hi, I have full experience with PHP and XML ========================================================== [login to view URL] Kindly check my profile here and send me a message for further discussion. More

$30 USD in 1 day
(2 Reviews)