i want to make a SOAP request to the server. But i'm struggling with an error. This is how the XML should look like:
<ExternalOrder Ref="85" Version="2">
<Orders>
<Order Operation="Add" Client="1">
<Item Operation="Add">
<ItemId>244</ItemId>
<Description>coke</Description>
<Quantity>2</Quantity>
<Price>1.75</Price>
</Item>
</Order>
</Orders>
</ExternalOrder>
Here is my PHP code:
$client = new SoapClient('http://11.30.11.151/ProxyWebService/ProxyService.asmx?WSDL', array('trace' => true));
$result = $client->__soapCall('AddOrder', array(
'ExternalOrder' => [
'Orders' => [
'Order' => [
'Item' => [
'ItemId' => '244',
'Description' => 'coke',
'Quantity' => '2',
'Price' => '1.75'
],
]
]
]
));
?>
Server response: Object reference not set to an instance of an object.
SOAP Request & Response
Moderatori: coditza, Emil, Moderatori
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 24 vizitatori