Submit XML doc to webservice, receive XML response doc (InfoPath 2010) - InfoPath Dev
in

InfoPath Dev

Submit XML doc to webservice, receive XML response doc (InfoPath 2010)

Last post 02-20-2013 10:32 AM by IamJohnStevens. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-14-2013 09:51 AM

    Submit XML doc to webservice, receive XML response doc (InfoPath 2010)

    I have searched InfopathDev and Google for days on this issue, and I must be searching on the wrong terms because I can't imagine that I'm the first person to be stumped by this challenge.

    How can I submit an XML document to a web service using my Infopath form's primary dataset, and receive an XML document in response that I can then bind to a secondary dataset?

    My web service method requires an XML document, which is easy to submit using InfoPath by starting with the "XML or Schema" form template and using the "Submit" options to create a data connection to the web service. InfoPath apparently anticipates no response from the web service after submitting the document.

    My web service method returns an XML document. It is easy to receive an XML document from a web service method by using the data connection wizard (or the web service form template)... but only if the web service method accepts distinct parameters, not an XML document.

    It is quite reasonable to expect that I should be able to do this without code. I should be able to specify an XML tree on the submit, and catch an XML tree in response. I have tried every combination of creating data connections that I can conceive of. I have tried modifying the schema file that the manifest references, to replace the queryFields XML that only hold distinct parameters with a robust XML structure.

    Your thoughts are appreciated.

    John Stevens
  • 02-17-2013 12:16 PM In reply to

    Re: Submit XML doc to webservice, receive XML response doc (InfoPath 2010)

    Hi John,

    You'll need to submit as a Receive connection, not a Submit. The receive connection can call a Web service and pass data to it, but you don't have the easy XML string option that you have for Submit, so you have to package up the XML and pass it as a parameter. You can do this using Concat (quite the chore for a large form). qRules has a command to submit XML to our DBXL Web service and get a response. The DBXL Web service is a generic web service for mapping to SQL database, SharePoint, and other Web services. It's cheap and a lot of people use it to save time and money.

    If you want to write your own, you'll have to enable code in the form to do this. We could share the qRules code with you for an hour of support time.

    Good luck,

    Patrick Halstead
    Project Manager at Qdabra
  • 02-20-2013 10:32 AM In reply to

    Re: Submit XML doc to webservice, receive XML response doc (InfoPath 2010)

    Thank you for the helpful feedback, Patrick.
    John Stevens
Page 1 of 1 (3 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.