I created an Infopath 2010 form based on a SharePoint 2010 list. I did this by clikcing on the "Customize form [in InfoPath]" button on the List Tootls > List menu. I added a REST call to a service on another, non-Sharepoint server. When I run the form in InfoPath 2010 Designer, the REST calls work fine. When I publish the form to SharePoint, I get an error when the form loads. Without the REST calls, the form works fine in SharePoint.
The error on the client browser is "XML data that is required for this form to function correctly cannot be found." When I check the SP server for the corresponding error, it says: "The form cannot run the specified query. The remote server returned an error: (404) Not Found".
The data connections were all converted to udcx Connection Files and posted on the same site that the form is published to.
When I run just the rest call from a browser on my client or on the Sharepoint server, it returns the correct value. But from SP, the form just errors out.
If I run the form from SharePoint on the SharePoint server itself, it fails when I use //<servername>/sitepages/form.aspx but the form and REST work fine if I instead use localhost from the sharepoint server: //localhost/sitepages/form.aspx. I don't know how to fix this.
I sniffed the traffic and see that when I use the localhost adress, the webservice server gets the request and returns a value. When I use the servername address, the webservice server never receives a call at all (hence the (404) Not Found error). When I sniff the traffic from the sharepoint sever, I dont see the REST call at all when the servername address is used.
Other information: REST service queries and totals a SP list. REST service is used because user wants a count of the number of entries for the current month. REST service requires no authentication. I have disabled loopbacks. In central admin, I have enabled "Allow cross-domain data access for user form templates" and "Allow user form templates to use authentication information contained in data connection files".
Any insight is appreciated. I have read a number of postings and tried a number of things, but most issues I read don't seem exactly the same.