How to pass XML payload to HTTP POST Service.
Hi All,
I am calling a RestFul service using Http Post method.
If the payload type is "url-encoded" then my directly assignment of values using assign activity is working fine.
But when i change the payload type to "xml" , It's erroring out saying the value is not provided for the parameters..
You can also try this using below details to reproduce the issue.
Details:
=====
URL : http://api.geonames.org/postalCodeSearch
Used HttpBinding as reference in composite.
XSD :
<?xml version= '1.0' encoding= 'UTF-8' ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org" targetNamespace="http://www.example.org"
elementFormDefault="qualified">
<xsd:element name="geonames">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="totalResultsCount" type="xsd:integer"/>
<xsd:element name="code" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="postalcode" type="xsd:string"/>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="countryCode" type="xsd:string"/>
<xsd:element name="lat" type="xsd:float"/>
<xsd:element name="lng" type="xsd:float"/>
<xsd:element name="adminCode1" type="xsd:string"/>
<xsd:element name="adminName1" type="xsd:string"/>
<xsd:element name="adminCode2" type="xsd:integer"/>
<xsd:element name="adminName2" type="xsd:string"/>
<xsd:element name="adminCode3" type="xsd:integer"/>
<xsd:element name="adminName3" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="Input">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="postalcode" type="xsd:string"/>
<xsd:element name="username" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
We need to send following input values to the service.
postalcode = 90110
username =siddhardha
Can someone let me know how to make it work with XML payload.Looks like i am not constructing the XML payload correctly in assign.
Please send me the sample to siddu_htc@yahoo.com.
Thanks in advance,
Siddhardha.