Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am getting the following error while trying to access a custom webservice from an infopath form to fetch some data. I have already gone through the actions described in the error message, but the problem still persists.

A query to retrieve form data cannot be completed because this action would violate cross-domain restrictions.

If this form template is published to a SharePoint document library, cross-domain access for user form templates must be enabled under InfoPath Forms Services in SharePoint Central Administration, and the data connection settings must be stored in a UDC file in a data connection library in the same site collection.

If this is an administrator-approved form template, the security level of the form must be set to full trust, or the data connection settings must be stored in a UDC file by using the Manage data connection files option under InfoPath Forms Services in SharePoint Central Administration.

A query to retrieve form data cannot be completed because this action would violate cross-domain restrictions.

share|improve this question
    
How are you publishing the form? Where is the webservice located? –  Hinek Apr 16 '13 at 15:15
add comment

1 Answer 1

So you have ensured that the "allow cross domain connection" setting in Central Admin is ticked.

If you are behind a proxy server, you will need to add this to your web.config of your SP web application:

<system.net>
    <defaultProxy>
      <proxy proxyaddress="http://myproxy" bypassonlocal="true" />
      <bypasslist>
        <add address="mycustomwebservice.com" />
         </bypasslist>
    </defaultProxy>
  </system.net>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.