I'm trying to implement an Infopath solution that posts an xml document (as string) to a webservice. When I created the first version of my form, it permitted me to drag two fields corresponding to the properties of the envelope being passed to the web service onto the design surface. The are XmlText and ItemType (a string). The form submits fine.
What I need to do is instead of having a large xml text field on the form, I want to have form(s) that are modeled after the schemas of the xml that is acceptable. For instance, one schema could be a dog:
<dog>
<size/>
<color/>
</dog>
and another could be cat:
<cat>
<hasClaws>true</hasClaws>
<tailLength/>
</cat>
On the original version of the form, the xml (cat or dog) is pasted into the XmlText field, and "cat" is entered into the ItemType field. What I would prefer is to be able to let the user select an ItemType and be presented with either a cat or a dog form that would then capture the XmlText and ItemType before calling the generic webservice.
And of course, I want to be able to point to an xsd to generate the cat or dog form. Any suggestions?