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

Here's the scenario:

We have a SPD custom workflow that is using the "collect data from user" action. So we have a number of fields in a Task list that the user needs to input.

We are customizing the InfoPath form for that Task list, and want to submit the data both back to the task list (as the normal Submit action would do) and to a MSSQL database (we have written a web service for this).

I have added the web service as an additional data connection and I have mapped the fields to the web service parameters. I can test the submit action in the InfoPath preview and can see that the data is successfully inserted into the database, so the web service connection works correctly.

To get the web service working (it is hosted on a machine other than the SharePoint server) I have had to enable cross-domain access for form templates in Central Administration.

Here is where I am running out of ideas. If I leave the InfoPath form as is, and don't convert the web service data connection to a UDCX connection, I get an error about restricting cross-domain connections. However, when I convert the connection to a UDCX connection in InfoPath, I can no longer submit the form because I get an InfoPath form saying the web service is returning an HTTP 400 error.

Does anyone have any ideas on what can be done here? I am at my wits' end on this one.

share|improve this question
    
Please provide more details about your environment. Are you using InfoPath Forms Services to render the forms? How is your web application setup in regards to authentication providers? NTLM? Kerberos? Claims? Are you testing from a workstation? Where are you deploying the UDCX files to? –  Miguel Lima Jun 13 '13 at 12:56
    
I am indeed using InfoPath Forms Services to render the forms. The web application is using Windows integrated authentication. I am testing and doing the SPD / InfoPath design from a workstation on the same domain as the SharePoint server. I am deploying the UDCX files to a Data Connections library created on the SharePoint site, as InfoPath will not let me create the UDCX files anywhere else. When I download the UDCX files to my machine and inspect them, they have the location of the web service indicated, but do not show any mappings of fields to parameters. Is this normal? –  Ryan Zink Jun 13 '13 at 16:58
    
One thing to note here is that when you test using the preview function from your workstation you authenticate straight to your web service. Whereas when you deploy the form and launch it through forms server you are authenticating against SharePoint and depending on your configuration and the way you are being authenticated which seems to be NTLM, you are not hitting the WS as yourself but as the app pool account. This is a classic double-hop authentication scenario. You should turn logging on in your WS and try granting your app pool account rights in there. Also consider Kerberos auth. –  Miguel Lima Jun 17 '13 at 5:31
    
Miguel, unfortunately we don't have control over the authentication as we are developing this application for a client with a system already in place. We found where the problem lies and a workaround, as I am outlining in the answer below. –  Ryan Zink Jun 17 '13 at 17:19

1 Answer 1

up vote 0 down vote accepted

We were ultimately unable to determine the cause behind this issue, due to time constraints. The UDCX file, when generated, contained none of the field-to-parameter mappings we had input into InfoPath, leading to the HTTP 400 error when the web service could not parse the parameters passed to it.

Our alternative solution was to pass the entire form as an XML document to the web service and have it parse the file's XML structure using the FieldName properties. Not an elegant solution, but it is getting the job done.

share|improve this answer

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.