Can get the response of wsdl SOAP v2 as required formate XML?

I Want to require formate XML response.

$proxy = new SoapClient('http://my_host/api/v2_soap/?wsdl', array('trace' => 1));
$sessionId = $proxy->login('tet', 'tet123');
$result = $proxy->ordersExport($sessionId, 33410);
echo htmlentities($proxy->__getLastResponse());

I am getting output as below :

<item xsi:type="ns1:associativeEntity">
<key xsi:type="xsd:string">OrderID</key>
<value xsi:type="xsd:string">1234</value>
<item xsi:type="ns1:associativeEntity">
<key xsi:type="xsd:string">InvoiceNumber</key>
<value xsi:type="xsd:string">125465231</value>
<item xsi:type="ns1:associativeEntity">
<key xsi:type="xsd:string">TransactionReference</key>
<value xsi:nil="true" />

Want output as :


Does anyone have an idea regarding this?

1 Answer 1


How we see output in xml format ? i can see in object format please guide me?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.