How to Pass the InfoPath Form XML to a Web Service AgilePart as an Argument?

Applies To

Objective

I want to use the web service activity in Envision in order to send the InfoPath form to a web service that reads the xml and updates our database. Could you explain how to map the xml of the form to the web method parameter?

Summary

Arguments to web service agilepart are passed in as custom attributes. A built-in custom attribute $// can be used to pass the InfoPath xml as the argument to web service agilepart.

Resolution

In web service AgilePart, the argument passed in such as $xmldoc is actually referring to the custom attribute with the name: xmldoc. For example, if you want to pass in the whole InfoPath xml, one way is to set a custom attribute with the InfoPath xml as the value of the custom attribute and then you can further pass it as the argument of the web service agilepart input.

In all InfoPath based process instance, AgilePoint will set an internal custom attribute ($//) that contains the xml of the whole InfoPath. You can directly pass it the custom attribute of $// as the argument to the web service agilepart. Please see attached screen shot as an example :