Can you offer any more specifics? I tried simply setting the "Main submit"
data connection to use the entire xml document but that yields an error. I
assume I have to change my web service to handle this behavior. Right now
the query connection gives me a DataSet and the submit connection accepts it
and returns void. For the record here's the error from infopath:
InfoPath cannot submit the form.
An error occurred while the form was being submitted.
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 (33, 54). ---> System.ArgumentException: The same table
(DsApplicant) cannot be the child table in two nested relations.
at System.Data.DataRelation.CheckNestedRelations()
at System.Data.DataRelation.set_Nested(Boolean value)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlElement tree, Hashtable
tableAtoms, DataTable table)
at System.Data.XmlDataLoader.InferSchema(XmlDocument xdoc, String[]
excludedNamespaces)
at System.Data.DataSet.ReadXml(XmlReader reader, Boolean denyResolving)
at System.Data.DataSet.ReadXml(XmlReader reader)
at AppTrack.Web.Services.Data.DsApplicant.ReadXmlSerializable(XmlReader
reader) in
\\vmwebserver\wwwroot$\apptrack\web\services\data\dsapplicant.cs:line 84
at
System.Data.DataSet.System.Xml.Serialization.IXmlSerializable.ReadXml(XmlReader reader)
at
System.Xml.Serialization.XmlSerializationReader.ReadSerializable(IXmlSerializable serializable)
at
Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read6_UpdateApplicant()
at
Microsoft.Xml.Serialization.GeneratedAssembly.UpdateApplicantSerializer.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, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader)
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.Invoke()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
Thanks for your help!
Franck Dauché said:
Hi Adam,
You could create a button on your form and create code that would call a Web
Service to pass the entire XML document. The XML parsing would happen within
the WS. The WS would then get all the IDs back from the DB and send them to
the calling form as return value(s).
Franck Dauché