Hi all
I have created an InfoPath template and during the publishing process I have promoted a property to a SharePoint column. This all works fine, and for each form that is saved in the document library for this template, the promoted property works fine.
Now someone else has the need to create forms in the document library using code - it's a web service that receives an XML document (that conforms to the XSD of the template) and saves it to the document library. The issue now is, that instead of the "my" namespace prefix, the program that calls the web service generates "ns0". Now, the XML is still valid given the XSD and Forms Server will display the form just fine. BUT, it appears that the definition of the promoted property is namespace prefix dependent (Don't you just hate systems that rely on a specific namespace prefix?). So the property isn't promoted at all.
Is there anything I can do about that? I would really hate to have to tell the caller of the web service that he needs to change the prefix of the XML he is sending for a couple of reasons:
-
It really shouldn't be necessary - the prefix shold not mean anything
-
The one calling the web service is using BizTalk and for him to change the prefix isn't that easy - it requires manual editing of generated files and can be overwritten later on
Myself, I have two suggestions:
-
In the manifest, where the promoted property is described, change the XPath expression for the property. This, however, can be overwritten later on, when the manifest file is updated
-
In the web service, change the prefix to "my" and save. This, however, means that what we save isn't what was sent to us so tracking is hard, and it introduces some code that may contain errors.
Any other ideas?
Thanks!
eliasen, representing himself and not the company he works for.
Microsoft BizTalk MVP
Blog: http://blogs.eliasen.dk/technical/