I been at this all day and feel like I'm getting nowhere, I need to get this to display as an xml like how it is on this page http://admin.stock.imdfulfilment.com/api/service.asmx/GetCouriers. Yet the following code
<?
try
{
$soap_url = 'http://admin.stock.imdfulfilment.com/api/service.asmx?wsdl';
$client = new SoapClient($soap_url, array(
'trace' => 1,
'exceptions'=>true,
'GetCouriersResult' => 'xml')
);
$client->GetCouriers();
$xml = simplexml_load_string($client->__getLastResponse());
$xml->registerXPathNamespace('soap', 'http://schemas.xmlsoap.org/soap/envelope/');
$xml->registerXPathNamespace('xsi', 'http://www.w3.org/2001/XMLSchema-instance');
$xml->registerXPathNamespace('xsd', 'http://www.w3.org/2001/XMLSchema');
foreach($xml->xpath('//soap:Envelope') as $item) {
echo "$item\n\n";
}
}
catch (Exception $e)
{
print_r($e);
}
?>