Loading ...
Sorry, an error occurred while loading the content.

NuSoap Client call second layer complexType XML element

Expand Messages
  • kensonpeh
    Hi All, I need to call third party web services from my php NuSoap. The Web Services abc.asmx?WSDL is look like below:
    Message 1 of 1 , Jun 21 8:26 AM
    • 0 Attachment
      Hi All,

      I need to call third party web services from my php NuSoap.

      The Web Services abc.asmx?WSDL is look like below:

      <?xml version="1.0" encoding="utf-8" ?>
      ...
      - <wsdl:types>
      - <s:schema elementFormDefault="qualified" targetNamespace="(URL address blocked: See forum rules)/">
      <s:import namespace="(URL address blocked: See forum rules)/wsdl/types/" />
      - <s:element name="submitAMBData">
      - <s:complexType>
      - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="userId" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="incId" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="callsign" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="bufferImage" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="data" type="tns:BigAntData" />
      </s:sequence>
      </s:complexType>
      </s:element>
      - <s:complexType name="BigAntData">
      - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="lastPatientFlag" type="s:boolean" />
      <s:element minOccurs="0" maxOccurs="1" name="Time_on_Reaching_Patient" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="Type_of_Building" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="Type_of_Building_SubSelect" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="Type_of_Building_Other" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="medication" type="tns:ArrayOfMedication" />
      </s:sequence>
      </s:complexType>
      - <s:complexType name="ArrayOfMedication">
      - <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded" name="Medication" nillable="true" type="tns:Medication" />
      </s:sequence>
      </s:complexType>
      - <s:complexType name="Medication">
      - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="Time" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="Drug_Procedure" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="Other_Drug_Name" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="Dosage" type="s:string" />
      </s:sequence>
      </s:complexType>
      - <s:element name="submitAMBDataResponse">
      - <s:complexType>
      - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="submitAMBDataResult" type="s:string" />
      </s:sequence>
      </s:complexType>
      </s:element>
      </s:schema>
      - <s:schema elementFormDefault="qualified" targetNamespace="(URL address blocked: See forum rules)/wsdl/types/">
      - <s:simpleType name="char">
      <s:restriction base="s:unsignedShort" />
      </s:simpleType>
      </s:schema>
      </wsdl:types>
      ...
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      In my SoapClient:
      $s = new nusoap_client($config->client_webService.'?WSDL',true);

      $arr_HtT_fields = array('userId' => 'IJM123');
      $arr_HtT_fields += array('incId' => 'DDAA11');
      $arr_HtT_fields += array('callsign' => 'HHGGAA');
      $arr_HtT_fields += array('bufferImage' => $base64_png);
      $arr_HtT_fields += array('data' => array('Last_record' => '1', 'Time_Begin' => 01:30));

      $result=$s->call('submitAMBData', $arr_HtT_fields);

      Result:
      They can receive value for 'userId', 'incId', 'callsign' and 'bufferImage' from my NuSoap calling but can not receive 'data' set values.

      Question:
      How should i call/send with element has different complex Type (type="tns:BigAntData") for 'data'?

      Thanks in advanced.
    Your message has been successfully submitted and would be delivered to recipients shortly.