Dubya008 Posted January 27, 2010 Share Posted January 27, 2010 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? Quote Link to comment Share on other sites More sharing options...
Dubya008 Posted January 29, 2010 Author Share Posted January 29, 2010 Any one at all?? Quote Link to comment Share on other sites More sharing options...
Dubya008 Posted February 1, 2010 Author Share Posted February 1, 2010 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()); Quote Link to comment Share on other sites More sharing options...
Dubya008 Posted February 1, 2010 Author Share Posted February 1, 2010 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? Quote Link to comment Share on other sites More sharing options...
Haberdasher Posted February 2, 2010 Share Posted February 2, 2010 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); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.