Hi,
I m using IP 2010 Web form for data retrieval and submission. I have a web service that returns me the record for the user i/p ID value. So far my web service returns the data based on a user typed ID value. However when I try to add the data connection(receive) in the IP 2010, it errors out saying
InfoPath was unable to create a schema from the results of the web Service call. On clicking the Details button, it shows:
The SOAP response indicates that an error occurred:
System.Web.Services.Protocols.SoapException: Server was unable to read request. ---> System.InvalidOperationException: There is an error in XML document (1, 402). ---> System.FormatException: Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Xml.XmlConvert.ToInt32(String s)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read1_GetPEFormDetailsForManila()
at Microsoft.Xml.Serialization.GeneratedAssembly.ArrayOfObjectSerializer.Deserialize(XmlSerializationReader reader)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
--- End of inner exception stack trace ---
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
--- End of inner exception stack trace ---
at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
My concern is my ID value's data type is int in SQL table. The data type in IP form is Whole Number(integer). I m not sure why IP is complaining about data type conversion in the above error message. Any suggestions on what /where to look at to rectify this issue?
Here's what my web service returns :
<?xml version="1.0" encoding="utf-8"
?>
- <DataSet xmlns="http://tempuri.org/">
- <xs:schema id="NewDataSet"
xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
- <xs:element name="NewDataSet"
msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
- <xs:choice minOccurs="0"
maxOccurs="unbounded">
- <xs:element name="_x005B_JF_Form_x005D_">
<xs:element name="JF_id" type="xs:int"
minOccurs="0" />
<xs:element name="PartnerCompanyName" type="xs:string"
minOccurs="0" />
<xs:element name="HiringManagerName" type="xs:string"
minOccurs="0" />
<xs:element name="BusinessOpsAnalystName" type="xs:string"
minOccurs="0" />
<xs:element name="CostCenter" type="xs:string"
minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
- <diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1">
- <_x005B_JF_Form_x005D_ diffgr:id="[JF_Form]1"
msdata:rowOrder="0">
<PartnerCompanyName>Tricore</PartnerCompanyName>
<HiringManagerName>Naseeb, Shrestha</HiringManagerName>
<BusinessOpsAnalystName>Pawana, Shrestha</BusinessOpsAnalystName>
<CostCenter>CN1180711</CostCenter>
</_x005B_JF_Form_x005D_>
</NewDataSet>
</diffgr:diffgram>
</DataSet>
Whis is very correct. I couldn't find why IP form is not able to accept the schema created by my web service? Please let me find answers to my question. Thanks a lot in adv!