More Browser-Enabled InfoPath Goodness

Last post 11-18-2008, 9:31 PM by mimi. 12 replies.
Sort Posts: Previous Next
  •  01-30-2008, 4:03 PM 21566

    More Browser-Enabled InfoPath Goodness

    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?

     


    Tim Byrne
    Clarity Consulting
    http://www.claritycon.com
  •  02-01-2008, 4:54 AM 21608 in reply to 21566

    Re: More Browser-Enabled InfoPath Goodness

    The error in the Event Log? is it K2 or SharePoint?

    You might want to upload the Xsn file to check out for us... 



    --
    Ruben d'Arco

    Application Developer
    Getronics PinkRoccade
    The Netherlands
  •  02-04-2008, 6:37 AM 21651 in reply to 21566

    Re: More Browser-Enabled InfoPath Goodness

    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.


    Please remember to change the thread status when a valid answer has been given
  •  02-04-2008, 11:59 AM 21664 in reply to 21651

    Re: More Browser-Enabled InfoPath Goodness

    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!


    Please remember to change the thread status when a valid answer has been given
  •  02-04-2008, 12:07 PM 21665 in reply to 21664

    Re: More Browser-Enabled InfoPath Goodness

    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.
    Tim Byrne
    Clarity Consulting
    http://www.claritycon.com
  •  02-04-2008, 1:54 PM 21667 in reply to 21664

    Re: More Browser-Enabled InfoPath Goodness

    It worked!  Nice job!
    Tim Byrne
    Clarity Consulting
    http://www.claritycon.com
  •  04-24-2008, 8:31 PM 23383 in reply to 21566

    Re: More Browser-Enabled InfoPath Goodness

    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.

  •  09-16-2008, 1:47 AM 26112 in reply to 21664

    Re: More Browser-Enabled InfoPath Goodness

    Hello,

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

    Thanks,

    Bernhard

  •  09-16-2008, 1:48 AM 26113 in reply to 21664

    Re: More Browser-Enabled InfoPath Goodness

    Hello,

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

    Thanks,

    Bernhard

  •  09-16-2008, 1:57 PM 26138 in reply to 26113

    Re: More Browser-Enabled InfoPath Goodness

    There is not a K2 solution that I am aware of.
    Tim Byrne
    Clarity Consulting
    http://www.claritycon.com
  •  11-17-2008, 11:59 PM 27316 in reply to 21664

    Re: More Browser-Enabled InfoPath Goodness

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

  •  11-18-2008, 4:05 AM 27318 in reply to 27316

    Re: More Browser-Enabled InfoPath Goodness

    Attachment: edit template.JPG
    Here is the screenshot showing Edit Template.


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
  •  11-18-2008, 9:31 PM 27328 in reply to 27318

    Re: More Browser-Enabled InfoPath Goodness

    Ok, thanks a lot for the screenshot.

View as RSS news feed in XML