Hi! I need some help in translating an XML request string into the matching PHP array.
I have been told the request I need to send should look like the below XML:
<?xml version="1.0" ?>
<VehLocDetail>
<Action />
<Message>
<POS>
<Source>
<RequestorID Type="000" ID="000" />
<BookingChannel Type="0" Primary="false" />
</Source>
</POS>
<Location LocationCode="000000" />
</Message>
</VehLocDetail> |
But no matter what I seem to try when creating the array the request has nothing in it.
$client = new nusoap_client('http://....?WSDL', TRUE);
$params = Array(
'POS' => Array(
'Source' => Array(
'RequestorID' => Array('Type' => '000', 'ID' => '000'),
'BookingChannel' => Array('Type' => '0', 'Primary' => 'false'))),
'Location' => Array('LocationCode' => '000000'));
$thisloc = $client->call('VehLocDetail', $params); |
The created request string:
<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2967="http://tempuri.org">
<SOAP-ENV:Body>
<VehLocDetail xmlns="http://..."/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> |
Can someone help please?!