ionik Posted May 22, 2009 Share Posted May 22, 2009 Hello! Working with SOAP for a client and they need us to interact with a API using SOAP. Issue I seem to be having is that when I talk back to their server it doesn't recognize the information I'm giving (I presume as I get a proper response) I'm not to familiar with SOAP but from my understanding, I need to send the data for the complexType Partner as an Object, for the createWorkOrder function... They gave us a C snippet for this which works ...... and the parser for this I believe is written in C also, we have contacted the companies support on this to get help but they are outsourced to India and are quite possibly, the most rude sonsa**** we have ever talked to and simply told us they "I dont know PHP im not Program Expert go find elsewhere some help" .....quoted This is the PHP code being used... $client = new SoapClient("http://qasecure.ars.com/leadws/leadws.asmx?WSDL",array("trace" => true)); echo '<pre>'; $Partner = new stdClass(); $Partner->partnerName = "Test"; $Partner->partnerPassword = "Test"; // Dump out our response var_dump($client->createWorkOrder(array($Partner, null)); // Responds with Invalid ID echo '</pre>'; And the SOAP XML Data <s:element name="createWorkOrder"> <s:complexType> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Partner" type="tns:partner" /> <s:element minOccurs="0" maxOccurs="1" name="WorkOrder" type="tns:workorder" /> </s:sequence> </s:complexType> </s:element> <s:complexType name="partner"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="partnerId" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="partnerName" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="partnerPassword" type="s:string" /> </s:sequence> </s:complexType> <s:complexType name="workorder"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="dispatchId" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="branchcode" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="servicecode" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="sourcecode" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="promocode" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="promodesc" type="s:string" /> <s:element minOccurs="1" maxOccurs="1" name="serviceDate" type="s:dateTime" /> <s:element minOccurs="0" maxOccurs="1" name="specialInstructions" type="s:string" /> <s:element minOccurs="0" maxOccurs="1" name="address" type="tns:serviceAddress" /> <s:element minOccurs="0" maxOccurs="1" name="customer" type="tns:customer" /> <s:element minOccurs="0" maxOccurs="1" name="work" type="tns:workDetails" /> </s:sequence> </s:complexType> Quote Link to comment Share on other sites More sharing options...
ionik Posted May 22, 2009 Author Share Posted May 22, 2009 Hahahaha love it when it this happens...... Problem solved....they need to pass it as array('Partner' => Object_Reference, 'WorkOrder' => Object_Reference); 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.