Jump to content

NuSoap Client call multi XML element


kenson

Recommended Posts

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="http://tempuri.org/">
  <s:import namespace="http://microsoft.com/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="http://microsoft.com/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 type (type="tns:BigAntData") for 'data'?

 

Thanks in advanced.

Link to comment
https://forums.phpfreaks.com/topic/162742-nusoap-client-call-multi-xml-element/
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.