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

Hello let me explain what I’m doing

I have an InfoPath form and this form access to one web service (Data Connection-Receive Data-SOAP Web Service)

This form template is published to a SharePoint document library, but when I open the form I get the next error:


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.

My question is the next:

Do I need to generate a Data Connection library and UDC file?

Can’t I use directly the Web Service?

Thanks for your support

share|improve this question
add comment

1 Answer

It is a guessing game what you are asking and in which context.

In Office 365 (Sharepoint Online) it is, in many circumstances, impossible to use webservice at all. And this depends there.

Also this depends whether it is web-enabled or filler form and how you publish it, etc., etc.

This is a kind of always present error with misleading description when an Infopath Filler form templates using external sources (like webservices) or heavy code behind which disappear after attributing a form template Full Trust and digitally signing the code. Though this results in necessity of further administration approval for using published form from Sharepoint site.

The latter again can frequently (but not always) be avoided if to create, or to convert, data connection (to external source like web service) to an UDCX data connection file and store it in a sharepoint data connection library than data.

This is the always-present error all novices bump into when previewing (it is always in local /client Infopath Filler) an Infopath form with external sources or codebehind even without any publishing. It disappears if to attribute the tempalte a Full Trust and digitally sign it. Though, it is somewhat unrelated with real usage of it from Sharepoint site upon publishing and especially if one uses Infopath Web Browser Form.
See more details in my answer to "Security message even when on localhost" question

Nobody will give you universal recipe for all cases in all contexts because it is undocumented and frequently have bugs or unintended by developers behavior depending on context and configurations. It is much easier and faster to give a try then ask it on the internet in vain.

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.