I am still learning. I have had some good success in the past using simplexml however I am kind of lost now that I have ventured into SOAP land.
Basically what I am trying to ultimately do is take this SOAP service, parse it out and stick the values into a MySQL db.
😕 Where do I go from here? I am pretty much stuck on getting the SOAP response to parse using simplexml. Can anyone please help?
<?php
//all rwis stations poll
$client = new SoapClient("http://www.wsdot.wa.gov/traffic/webservices/XMLScandata.asmx?WSDL",
array(
"trace" => 1,
"exceptions" => 1,
"cache_wsdl" => 0)
);
// get a response from the WSDL server function
$response = $client->Scandata(array("a" => "", "b" =>""));
$xml = simplexml_load_string($response->ScandataResponse);
print_r($xml);
// display what was sent to the server (the request)
//echo "<p>Request :".htmlspecialchars($client->__getLastRequest()) ."</p>";
// display the response from the server
echo "<p>Response:".htmlspecialchars($client->__getLastResponse())."</p>";
?>