NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Problem: Make a specified SOAP request using NuSOAP


Joined: 10 Jun 2010
Posts: 1
Reply with quote
Hi,

I am trying to establish connection with a webservice using NuSOAP. The webservice has a web method called GetShipmentInfoByTrackingNumber(). I am provided a sample SOAP request to this web method below, and I do not know how to make such request using NuSOAP!


Quote:
POST /IPStracking.asmx HTTP/1.1
Host: wsuat.g4si.com
Content-Type: application/soap+xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Header>
<G4SIAuthentication xmlns="http://tempuri.org/">
<Username>string</Username>
<Password>string</Password>
<AccessKey>string</AccessKey>
</G4SIAuthentication>
<ShipmentTrackingRequest xmlns="http://tempuri.org/">
<TrackingNumber>string</TrackingNumber>
</ShipmentTrackingRequest>
</soap12:Header>
<soap12:Body>
<GetShipmentInfoByTrackingNumber xmlns="http://tempuri.org/" />
</soap12:Body>
</soap12:Envelope>



I tried these codes:

Quote:
$soapClient = new nusoap_client("https://wsuat.g4si.com/IPStracking.asmx?wsdl", true);
$soapClient->setCredentials('username','password','basic',array('AccessKey'=>'xxxxx'));
$parameters = array('TrackingNumber'=>'string');
$result = ($soapClient->call("GetShipmentInfoByTrackingNumber", $parameters));


It returned some general error: "Object reference not set to an instance of an object.".

Any advice will be appreciated!

Thank you!
View user's profileFind all posts by keithliuSend private message
Problem: Make a specified SOAP request using NuSOAP
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic