Jump to content

SOAP Help


Dubya008

Recommended Posts

I've built a few website using PHP and MySQL. What I'm looking to do now is to use PHP to execute SOAP commands. I have a list of operations found at http://lynxmin.lynxfulfillment.com/pmomsws/order.asmx

I'm trying to pull order info and add an order via PHP.

 

I'm not sure where to start can anyone point me in the correct direction or provide an example of how to execute one of the comands?

Link to comment
https://forums.phpfreaks.com/topic/190030-soap-help/
Share on other sites

I've been able to find some info on returning a list of functions. (below) Now my problem is that i need to post a request and am having trouble doing that one.

 

$wsdl_url ="http://lynxmin.lynxfulfillment.com/pmomsws/order.asmx?wsdl";

  $client    = new SoapClient($wsdl_url);

  var_dump($client->__getFunctions());

Link to comment
https://forums.phpfreaks.com/topic/190030-soap-help/#findComment-1004933
Share on other sites

SO i've been able to make some progress (if that is what you'd call it). The GetOrderInfo Method needs 3 parameters:

Username

Password

OrderId

 

I've got the following code

 

       $Username='UserTest';
$Password='test';
$orderId='ZoneTest';

$client = new SoapClient("http://lynxmin.lynxfulfillment.com/pmomsws/order.asmx?wsdl");
$client->GetOrderInfo($Username,$Password,$orderID);

 

 

I'm not sure why but the parameters aren't passing over correctly. Is there something i should be doing differently?

Link to comment
https://forums.phpfreaks.com/topic/190030-soap-help/#findComment-1004982
Share on other sites

If I remember correctly the params and param values need to be in an associative array. If this doesn't work out for you I'll try to find some code I have somewhere that I've used before:

 

$client = new SoapClient("http://lynxmin.lynxfulfillment.com/pmomsws/order.asmx?wsdl");
$params = array('Username'=>'UserTest', 'Password'=>'test', 'orderId'=>'ZoneTest');
$client->__soapCall("GetOrderInfo", $params);



 

 

Link to comment
https://forums.phpfreaks.com/topic/190030-soap-help/#findComment-1005361
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.