Jump to content

[SOLVED] SOAP complexType


ionik

Recommended Posts

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>

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.