LEGACY CONTENT
This article refers to legacy products, components or features. Therefore, the content in this article is offered "as is" and will no longer be updated. 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.

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:
  1. Designs an InfoPath form and adds a new Data Connection using a web service to submit data
  2. Converts the Data Connection (Tools > Data Connections > Select DC > Convert > [http://portal.k2demo.com/main submit.udcx]
  3. Saves the InfoPath form
  4. Integrates the InfoPath form in K2 Designer for Visual Studio
  5. Deploys the process and starts the InfoPath integrated process
  6. Attempts to open the Form
The local machine has the following items installed:
  • 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:
  1. 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)
  2. Open the form in Design mode
  3. In the file menu select Save As Source Files
  4. 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>
 
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>
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.