I've read every question on Stackoverflow as well as every Google article I could find.
I need to consume a SOAP API that is being provided by a Microsoft system that uses datasets.
I've got to the point where I feel that I need to do this:
$soapClient = new soapclient($this->wsdlUrl,array('trace'=>true)); $soapResult = $soapClient->GetScheduledSectors(); $xmlResult = $soapClient->__getLastResponse(); $xml = simplexml_load_string($xmlResult, NULL, NULL, "http://schemas.xmlsoap.org/soap/envelope/");
Rather than using this approach:
$result = $soapClient->GetScheduledSectors(); $xml = simplexml_load_string($result->GetScheduledSectorsResult->any)
Because simplexml cannot parse the result as it lacks the soap response headers.
However, even though the first method does not throw any errors I am left with an empty object like this:
SimpleXMLElement Object ( [Body] => SimpleXMLElement Object ( ) )
I really cannot find any coherent example of how to consume a Microsoft SOAP service. I tried reading the MSDN stuff but it's geared exclusively towards their proprietary libraries so is of little use to anybody else.