Data Connection String Issue with UDCX Files and InfoPath
KB000255
PRODUCTK2 blackpearl
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.
Introduction
An error occurs when accessing data sources using UDCX data connections within a K2 integrated Microsoft Office InfoPath 2007 form.
This article will describe the error involved, and how to resolve the issue.
This article will describe the error involved, and how to resolve the issue.
Error In The Data Connection String In InfoPath Manifest.xsf
The string generator of the K2 blackpearl 0803 InfoPath integration wizard misplaces the initial slash ('/') in the "source" parameter, and the final slash ('/') at the end of the siteCollection parameter. This causes a data connection error when using the form.
Example Scenario
The steps below describe one scenario under which this error may occur. The steps below are simplified and not all the steps will be shown or described.
The K2 developer performs the following steps:
The K2 developer performs the following steps:
- Designs an InfoPath form and adds a new Data Connection using a web service to submit data
- Converts the Data Connection (Tools > Data Connections > Select DC > Convert > [http://portal.k2demo.com/main submit.udcx]
- Saves the InfoPath form
- Integrates the InfoPath form in K2 Designer for Visual Studio
- Deploys the process and starts the InfoPath integrated process
- Attempts to open the Form
- K2 blackpearl 0803
Error Message
The following error message relates to this KB Article:
- An error occurred accessing a data source
Error Resolution
The error can be resolved by following the steps below:
- From the form library where the form was published, navigate to advanced settings, and right-click "Edit Template" and download the form (Save Target As)
- Open the form in Design mode
- In the file menu select Save As Source Files
- Edit the manifest.xsf with a text editor using the following example as a guide:
Locate the connection xsf2:connectoid tags:
<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>
<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>
Remove the initial slash ('/') in the "source" parameter, and add a final slash ('/') at the end of the siteCollection parameter, so that it resembles the following 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>
<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>
Open the manifest.xsf in design mode, save it as an XSN file (overwrite the one downloaded from the form library), and then publish it in the same library.