I faced a new problem with Web Service and InfoPath form browser-enabled. When I was creating the form all seems to be ok. But when I uploaded my form to SharePoint server and try to get any data from the Web service I get an error. In the SharePoint log I’ve found entries like this:
Data adapter failed during OnLoad: 10/27/2010 14:32:37.16 w3wp.exe (0x0734) 0x0C2C Forms Server Forms Services Runtime – Data C 82fx Warning The form could not retrieve data from http://d15svshare:45000/EurovederWebService/euroveder.asmx because it would violate cross-domain restrictions. To allow this connection for administrator-approved form templates, enable full trust for the form template, or add the connection to a Data Connection Library. For user form templates, cross-domain connections must be enabled in SharePoint Central Administration, and all connections must be in a Data Connection Library. For more information, please see the security documentation for InfoPath Forms Services.
Ok. Let’s try… I’ve turn on cross-domain connection – still nothing. So let’s continue. I’ve created Data Connection Library and from InfoPath Designer I selected my connection and press “Convert” button. Please remember to approve your data link as by default all connections must be approved to be used by InfoPath form.
And that’s all. After that you can send/ receive data from web service. Web Service and InfoPath works as expected.