Skip to main content
Nintex Community Menu Bar

Urgent. InfoPath form opens as XML at MOSS

  • September 18, 2008
  • 3 replies
  • 19 views

Forum|alt.badge.img+3

Hello guys.

We have a standard K2 blackpearl + InfoPath 2007 + MOSS solution. K2 process starts when the user submits a new InfoPath form into the Form Library, and I am sure all of you are familiar with this scenario. We are not utilizing Form services, but use InfoPath client application, because of some code-behind.

After the user submits the InfoPath form it gets successfully uploaded into the MOSS Form Library and the K2 process kicks in. However, under the Type column, it appears with the standard XML icon, rather than InfoPath. Also, when the user clicks on the document in the library, it opens as raw XML, rather than starting the InfoPath application.

I have tracked down the problem to the following point - the submitted form lacks the InfoPath header:


<?mso-application progid="InfoPath.Document" versionProgid="InfoPath.Document.2"?>

 and really appears to be plain XML.

So I was wondering if any of you have any clue how this could happen? If I open the InfoPath form in Design mode and fill it out using the Preview button, then upload it manually to the Form Library, it appears OK. So I am thinking - it must have something to do with the way the form is submitted then? This is due via 'rules', as the last rule is calling the RuntimeServices/InfoPathService.asmx service to do the upload.

As always, any hints are highly appreciated!

3 replies

Forum|alt.badge.img+8
  • September 18, 2008

Hristo,


this is a strange one, it sounds like only a node and not the entire xml doc is submitted, when you go to the datasources and look at the submit one, is the radio button to submit entire form selected and submit as string checked?


 


Forum|alt.badge.img+3
  • Author
  • September 18, 2008
Hi Deon,

Yes, both of them are checked...

Forum|alt.badge.img+3
  • Author
  • September 19, 2008

Note to self - never do that again:

K2.ProcessInstance.XmlFields[infoPathFormFieldName].Value = updatedInfoPathXml.DocumentElement.OuterXml;

Instead, do:

K2.ProcessInstance.XmlFields[infoPathFormFieldName].Value = updatedInfoPathXml.OuterXml;