This is a discussion on Handling Complex Data types in webservices - XML SOAP ; I am trying to call a webservice that requires me to send data as a complex type. I've worked with MS SOAP toolkit and called webserivces, but all these had arguments that were simple data types such as string, int ...
I am trying to call a webservice that requires me to send data as a
complex type. I've worked with MS SOAP toolkit and called webserivces,
but all these had arguments that were simple data types such as
string, int etc. This particular one requires a complex data type as
one of its arguments.
For example arg0 (the first argument to be passed to the webservice
would have to look something like this (as per the WSDL definition):
<xs:complexType name="system_Identity">
<xs:sequence>
<xs:element name="application_id" type="tns:appId"/>
<xs:element name="lang" type="ns1:langCode"/>
<xs:element name="country" type="ns1:addrCountryCd"/>
<xs:element name="sysId" type="xs:string" minOccurs="0"/>
<xs:element name="profile_id" type="xs:string" minOccurs="0"/>
<xs:element name="sessionToken" type="xs:string" minOccurs="0"/>
<xs:element name="enc_sys_id" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
The request SOAP body needs to look like this
- <soapenv:Body>
- <q1:createOfflineSystem>
- <arg0>
<q0:application_id>938</q0:application_id>
<q0:lang>02</q0:lang>
<q0:country>11</q0:country>
<q0:sysId>poasdle3</q0:sysId>
<q0rofileId>789686</q0
rofileId>
</arg0>
</q1:createOfflineCustomer>
</soapenv:Body>
Where I used to pass simple string arguments to my webservices, now I
am faced with sending a complex type. Is there a way for MS SOAP
tooklit to generate the above SOAP body?
Is there a way to do this or does Microsoft have any documentation on
this?
Regards,
Danny.