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]">
<soapenv:Header/>
<soapenv:Body>
<tem:DownloadLP>
<tem:userName>UN</tem:userName>
<tem:password>PwD</tem:password>
</tem:DownloadLP>
</soapenv:Body>
</soapenv:Envelope>
';
$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]">
<s:Body>
<DownloadLoadPlansResponse xmlns="[login to view URL]">
<DownloadLoadPlansResult xmlns:a="[login to view URL]" xmlns:i="[login to view URL]">
<a:AdditionalDetails i:nil="true"/>
<a:IsSuccessful>true</a:IsSuccessful>
<a:DataList>
<a:DataObject>
<a:Data>
<?xml version="1.0" encoding="UTF-8"?>
<LXML messages="1" batchseq="80" created="2021.May.11 AD 10:50 AM">
<ShipperLoadPlan CreateDate="05/11/2021 10:48:33.075" ExecutionEvent="Accepted Load Modified" ExecutionEventID="AM"><LoadNumber>54310410</LoadNumber><lLoadID>54310410</lLoadID></ShipperLoadPlan></LXML>
</a:Data>
<a:ID>3302</a:ID>
</a:DataObject>
<a:DataObject>
<a:Data>
<?xml version="1.0" encoding="UTF-8"?>
<LXML messages="1" batchseq="81" created="2021.May.11 AD 10:50 AM">
<ShipperLoadPlan CreateDate="05/12/2021 10:48:33.075" ExecutionEvent="Accepted Load Modified" ExecutionEventID="AM"><LoadNumber>54310411</LoadNumber><lLoadID>54310411</lLoadID></ShipperLoadPlan></LXML>
</a:Data>
<a:ID>3302</a:ID>
</a:DataObject>
<a:DataObject>
<a:Data>
<?xml version="1.0" encoding="UTF-8"?>
<LXML messages="1" batchseq="82" created="2021.May.11 AD 10:50 AM">
<ShipperLoadPlan CreateDate="05/13/2021 10:48:33.075" ExecutionEvent="Accepted Load Modified" ExecutionEventID="AM"><LoadNumber>54310412</LoadNumber><lLoadID>54310412</lLoadID></ShipperLoadPlan></LXML>
</a:Data>
<a:ID>3302</a:ID>
</a:DataObject>
</a:DataList>
</DownloadLoadPlansResult>
</DownloadLoadPlansResponse>
</s:Body>
</s:Envelope>
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 project requirements
And will be glad to assist you with that on top priority basis.
Timely delivery and quality of work is my passion.
If you want to work with me then feel free to contact me.
You can see my different portfolios in below links:
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]
[login to view URL]