InfoPath: The SOAP message cannot be parsed.

A client wanted to use SSL across their SharePoint 2010 platform internally.  As part of that work, all of the InfoPath forms need to be updated.  There were three environments – Development, Test and Production.

The Production environment worked fine, but whenever I updated the data connections in Development or Test, I received the message:  “Unable to connect to the SharePoint site.  The SOAP message cannot be parsed.”

InfoPath_SOAP1

I struggled with this for awhile, and couldn’t work out what the problem was.  Whenever I reverted to non-SSL, I did not have any problems.  I initially thought that InfoPath did not like the self-signed certificates on Dev or Test, and I even tried domain trusted certificates similar to the Production environment, but to no avail.

I turned up full diagnostic logging on SharePoint, and it stood out that for some reason it was making requests to the non-SSL URL.  Whenever I tried it directly (eg http://xxtest01.xxx.internal/_vti_bin/Webs.asmx) I was redirected to HTTPS and received a valid response.

InfoPath_SOAP2

Finally, I took a look at the alternate access mappings, and discovered the problem – the public URL was not set to use HTTPS on Dev or Test, but was set to use HTTPS on Production.

InfoPath_SOAP3

As soon as I changed the public URL to https://xxtest01.xxx.internal, my problems in InfoPath disappeared and I was able to setup the data connections with SSL.