SOAP message could not be parsed

Over the last few days I have had a problem publishing an InfoPath form to a SharePoint 2010 list, this took me almost 2 days solid work to resolve so I hope this post saves somebody else’s time….

I have a SharePoint list which uses a custom InfoPath form. The list has been used in a production environment for a few months so it has grown to over 30k items.

I had been asked to make a change to the InfoPath form, so I made the change and clicked publish – I get the error “The SOAP message could not be parsed” after some googling I found out this was because of the high amount of items in the list. So I then created an identical list, using content and structure I moved all of the items from the first list (this took ages as it only does it 1000 at a time) I then made the changes to the InfoPath form and published it. Tested it worked (which it did) then I moved all of the items back again using content and structure (I moved the data this way as I needed to retain the created/modified fields).

After moving all of the data back, I tested the form and it had reverted back to how it was before I started this process! grrr

So I decided to check the logs (I know this should have been my first port of call) I could see in the logs that the SOAP message was really just InfoPath’s lack of understanding SharePoint errors and it was really a timeout error. So my next port of call was to edit the web.config file to increase the http timeout, you can do this by going to the drive your IIS stores its data > Inetpub > wwwroot > wss > VirtualDirectories > “your web app” . Edit the web.config file in a text editor like notepad; look for this line of code –

<httpRuntime maxRequestLength=”2097151″ executionTimeout=”3600″ />

Then increase the executionTimeout,  in my case it was already at 3600 (I had already increased this when I built the server) This should have been more than enough, just in case I added a few zeros, saved the file and reset ISS.

I then clicked in my SharePoint list, clicked customize InfoPath form, made my changes and clicked publish……. I got the SOAP message again.

Back to the drawing board again! I then changed the execution time out on the web.config file back to how I found it as it was clear this had not made a difference.

So I knew it was timing out but I wasn’t sure why, after all, the default timeout setting was not causing the issue.

At this point I went through all of the InfoPath service settings which I won’t go into detail on as they were not the problem.

As this particular list had several calculated fields I decided to delete these and try again, after all, as the InfoPath form publishes it updates every item in the list, so it was logical that the calculated fields would then try to update too and cause a long session. When I went to delete these columns I received an error “This page has been modified since you last opened it”. From previous experienced I knew this was a custom branding issue, so I reset my master page back to the out of the box V4 and tried to delete the calculated columns again, this time they deleted fine.

I then clicked on customise form, made the changes to the InfoPath form, clicked publish …. It worked!!

So after all my work it turned out that it was the calculated fields, which in turn had problems due to the custom branding.  After testing the InfoPath input form was working as I wanted it to I then recreated the calculated fields, tested the form again, then set my custom master page as default and again tested the form. It all worked!

Advertisements

Infopath calculate each row of a repeating table

This was somthing that bugged me for ages then it suddenly clicked and i couldnt belive how simple it is . As i didnt find anything on the net to help me work this out  i hope this will help someone.

The senario is;

I have a field in an infopath form which holds a value, then i have a repeating table in the same form which is from a SharePoint list. This repeating table has a number column which i want to calculate against the value field row by row.

My first mistake was to think that this is possible using a single text field, it is only possible to do this with a calculated value field as you cannot store data unbound in a repeating table.

Click on the right hand column in the repeating table and choose “Insert” > “Column to the right” give it a meaningful header then click in the new cell and insert a calculated value field.

Right click the calculated value field and click properties, click on the “FX” xpath button and then insert a field, choose the data source which the repeating table comes from, choose the field you wish to calculate on, then do the same to insert the in form field to calculate with and once both fields are in the box put the calculation symbol between the fields i.e. * / – + . Click ok to get back to the form and preview. Now all rows should have a row by row calculation against them.