The Error code 5566 is very common, and if you get that error
“ An error occurred querying a data source.
Click OK to resume filling out the form. You may want to check your form data for errors. Hide error details System.Xml.XmlException: There are multiple root elements. Line 2, position 2 …………………….. “
Code 5566 is a very common error when performing cross web services calls
The Problem is more of a server architecture issue ( on a single sever farm configuration you may not have those issues)
The Root causes
- Name resolution
- Certificate validation errors
- UAG or any Url Filter or traffic parsing engines (F5 Big-IP and the like.)
The cause can be one or all of the above.
Simply to understand the problem, you need to understand how InfoPath handles this type of traffic.
- Client ( C ) requests a form operation from form server ( S )
- S read the template from the same server or the document library or storage .
- S builds a temp map in memory for the current user of the form rules and code for the duration of the session.
- S Execute the operation (read, update, or new) form.
- C render on InfoPath Client or Browser (thin client )
- S terminates session.
Where things break
At steps 1, 2, 3 and 4
|1|| C resolve the server as [IP x.y.z.w] but Sresolves as different IP and server encounter a template or form load error but does not report it to the user||Try to browse the data connection urls from the server itself and check if you encounter any problem , resolve accordingly(In some cases internal DNS record does not match the proper configuration use hosts file entry to manually force the session to the same server)|
|2|| If you are behind a proxy or load balanced farm||Try to configure it so that the server sessions are bound to a single server for the same client.|
|3|| If you are using a public name and internal name using AAM||Make sure you are resolving the correct IP inside and outside the proxy/firewall see Item 1|
|4|| S can’t load the form or the template||That should not cause 5566 but it will be more descriptive If you are using a proper proxy configuration , but in some cases where the proxy configuration is not correct this will show as error 5566|
|5|| If you have dynamic links for services that gets compiled at load||You need to debug this by loading this form on the same server.|
|6|| If you are using SSL certs||Make sure your server can validate the certificate or disable certificate validation.|
|7|| If read new or update operation||Check the on load rules and see if those generate certain other web services or list connections that cause this issue and handle as in item 1 above|
Best of Luck