More Browser-Enabled InfoPath Goodness


Badge +9

So I managed to get my browser-enabled InfoPath form deployed (I had to open visual studio under the blackpearl service account and deploy it as him, otherwise I got an unspecifeid server error) and I can now open my forms purely in the browser.  However, I get an error every time I submit the form:  'An error occurred accessing a data source'.


When I look into the server's event log, I see the error that the connection file could not be found.  The path that it shows there is like this:  [server name]/K2 BlackPearl Data Connections/InfoPath Web Service/Submit Workflow.udcx


Its true, that path does not exist as the data connections we created in my site collection here:  [server name]/sites/tbyrne/K2 BlackPearl Data Connections/InfoPath Web Service/Submit Workflow.udcx.


Why is it trying to access the connections from the site root instead of my site collection?  Is this a bug, or something I am doing wrong?


 


12 replies

Badge +8

Hi tbyrne,


I'm getting a very similar error. I haven't tryed submitting the form so far, but I have other data connections in my form, and when I use the design checker, Infopath says the form template is invalid ("Relative links to Data Connection Libraries located on different Sharepoint site collection are not supported") because I can't use data connections from different site collections... But all my data connection files are in the same library! The difference is that some of them are custom, and other are K2 Blackpearl. This problem didn't occur when I worked on site collection with no managed path (http://myserver:10000/) but now that I work on http://myserver:10000/sites/mysite, it occurs!


I think Blackpearl is always trying to bind to udcx at the root level, this is why it appears as a different site collections in my case (however the displayed path is the expected one when I look in "Data connections" menu in Infopath.


I'll have a look at the xsf file and keep you inform.

Badge +8

I have a solution! I spent the afternoon on this case with Mike_H and it appears that it's related to the way Blackpearl generates the data connection string in Infopath manifest.xsf file.


Just give a try:



  • from the form library where you published the form, navigate to advanced settings, and right-click "Edit Template" and download it (Save Target As).
  • open it in Design mode
  • in file menu, select Save As Source Files
  • edit the manifest.xsf with a text editor and find where the data connections are set

You should see this kind of tag:


<xsf2:webServiceAdapterExtension ref="Get Workflow Task Actions Service" trackDataSetChanges="no">
      <xsf2:connectoid connectionLinkType="relative" siteCollection="http://myserver:10000/sites/mysite" source="/K2 BlackPearl Data Connections/InfoPath Web Service/Get Actions.udcx" name="Get Actions"></xsf2:connectoid>
     </xsf2:webServiceAdapterExtension>


Just remove the initial slash ('/') in the "source" parameter, and add a final slash ('/') at the end of the siteCollection parameter, so that you finally get this kind of data connection:


<xsf2:webServiceAdapterExtension ref="Get Workflow Task Actions Service" trackDataSetChanges="no">
      <xsf2:connectoid connectionLinkType="relative" siteCollection="http://myserver:10000/sites/mysite/" source="K2 BlackPearl Data Connections/InfoPath Web Service/Get Actions.udcx" name="Get Actions"></xsf2:connectoid>
     </xsf2:webServiceAdapterExtension>


 Then open your manifest.xsf in design mode, save it as an XSN file (you can overwrite the one you downloaded from the form library), and publish it in the same library. Open it, it works!


Hope this helps!

Badge +9
Thanks man!  I'll give that a shot later today but I don't see why it wouldn't work.  Hopefully we can get a hotfix for this one, as that is a pretty annoying work-around to deal with on every deploy.
Badge +9
It worked!  Nice job!
Badge

Delighted to find this thread.  It got my problem solved, but just as a footnote I had to do a little more work.


For me there were three entries in the manifest.xsn file.   I tried editing only the "Get Actions" entry first as described and got an error complaining about "... relative paths not allowed ..." when trying to publish.  After hacking a little I found it was the appending of the '/' char to the siteCollection parameter and backed that edit out.  Then I could publish the form but still got the same error (in the MOSS log).  I could have done them one at at time I guess, but I removed the leading '/' char from the "K2 Blackpearl .." string for the "source" paramter for all three entries, and republished.  I ended up with the following three entries:


    <xsf2:dataConnections>
     <xsf2:webServiceAdapterExtension ref="Get Workflow Task Actions Service" trackDataSetChanges="no">
      <xsf2:connectoid connectionLinkType="relative" siteCollection="http://mycomputer/mylib/forms" source="K2 BlackPearl Data Connections/InfoPath Web Service/Get Actions.udcx" name="Get Actions"></xsf2:connectoid>
     </xsf2:webServiceAdapterExtension>
     <xsf2:webServiceAdapterExtension ref="Can I Submit Workflow Service" trackDataSetChanges="no">
      <xsf2:connectoid connectionLinkType="relative" siteCollection="http://mycomputer/mylib/forms" source="K2 BlackPearl Data Connections/InfoPath Web Service/Can I Submit.udcx" name="Can I Submit"></xsf2:connectoid>
     </xsf2:webServiceAdapterExtension>
     <xsf2:webServiceAdapterExtension ref="Submit Workflow Service" trackDataSetChanges="no">
      <xsf2:connectoid connectionLinkType="relative" siteCollection="http://mycomputer/mylib/forms" source="K2 BlackPearl Data Connections/InfoPath Web Service/Submit Workflow.udcx" name="Submit Workflow"></xsf2:connectoid>
     </xsf2:webServiceAdapterExtension>
    </xsf2:dataConnections>


But then I got a new error (in the MOSS Log): "The form could not be submitted to http://k2.mycomputer/RuntimeServices/InfoPathService.asmx because this action would violate cross-domain security restrictions.  To allow this data connection ..."


I had to go to the Central Admin -> Application Management  -> InfoPath Forms Services -> Configure InfoPath Forms Services, and check "Allow cross-domain data access for user form templates that use connection settings in a data connection file".  I did not have it checked because this is a stand-alone development environment, and it wasn't intuitive that it should be checked.  The single server also serves as the single domain controller.


 Again, thanks tbyrne for starting this thread.

Badge +4

Hello,


Is there already a K2 solution available for this problem rather than changing the settings manually afterwards?


Thanks,


Bernhard

Badge +4

Hello,


Is there already a K2 solution available for this problem rather than changing the settings manually afterwards?


Thanks,


Bernhard

Badge +9
There is not a K2 solution that I am aware of.
Badge +2

Sorry, I couldnt find "Edit Template" when navigate to advanced settings at my form library. Could you provide screenshot? Thanks in advanced.

Badge +9
Here is the screenshot showing Edit Template.

13282i70F4DF3069FD49FC.jpg
Badge +2

Ok, thanks a lot for the screenshot.

Badge +1

Hey, i re-open this old thread.

I found the similar problem.

At
my environment, the solution mention above only work when i open the
infopath form from browser at server, and data can be submitted to sql server.

When i open the infopath form at the client browser, the data couldn't retrieve from server and also couldn't submit to server.

I am using udcx->endpoint-SQL Server web service to retrieve and submit data.

i have checked permission at sql server database.

i am glad to hear ur responses....

Reply