Universal Data Connection v2.0 Reference and Schema
The Universal Data Connection (UDC) file format has been used by FrontPage since Office 2003 to store data connection information used by Web parts. The UDC v1 file format is documented in the Office 2003: XML Reference Schemas.
Unlike the ODC format used by other Office applications, which stores information about database connections, UDC files can store information about several different types of data connections, and can be extended to store information about arbitrary types.
There are two versions of the UDC file format used by Office 2007 applications. InfoPath uses the v2.0 format which is described in this document.
UDC v2.0 Example
The following example of a UDC v2.0 shows how the basic structure of the UDC file is similar to previous versions.
<?MicrosoftWindowsSharePointServices ContentTypeID=”0x010100B4CBD48E029A4ad8B62CB0E41868F2B0”?>
<udc:DataSource MajorVersion="2" MinorVersion="0" xmlns:udc="https://schemas.microsoft.com/office/infopath/2006/udc">
<udc:Name>Submit to HTTP</udc:Name>
<udc:Description>This UDC file describes an HTTP Submit connection for InfoPath</udc:Description>
<udc:Type MajorVersion="2" MinorVersion="0" Type="XmlSubmit"/>
<udc:ConnectionInfo Purpose="WriteOnly">
<udc:UpdateCommand>
<udc:Submit>http://www.example.com/postTarget.aspx</udc:Submit>
</udc:UpdateCommand>
<udc:Authentication />
</udc:ConnectionInfo>
</udc:DataSource>
UDC v2.0 Schema Reference
Global Properties
File extension: *.udcx or *.xml
XML Namespace: https://schemas.microsoft.com/office/infopath/2006/udc
Content Type ID: 0x010100B4CBD48E029A4ad8B62CB0E41868F2B0
The Processing Instructions
Name | Type | Description |
---|---|---|
MicrosoftWindowsSharePointServices |
Processing Instruction |
|
MicrosoftWindowsSharePointServices/@ContentTypeID |
Attribute |
Must be 0x010100B4CBD48E029A4ad8B62CB0E41868F2B0 |
The DataSource Element
<udc:DataSource MajorVersion="2" MinorVersion="0" xmlns:udc="https://schemas.microsoft.com/office/infopath/2006/udc">
<udc:Name/>
<udc:Description/>
<udc:Type MajorVersion="2" MinorVersion="0" Type=""/>
<udc:ConnectionInfo/>
</udc:DataSource>
Name | Type | Description |
---|---|---|
DataSource |
Element |
Container element |
DataSource/@MajorVersion |
Attribute |
Must be 2 |
DataSource/@MinorVersion |
Attribute |
Must be 0 |
Name |
Element |
Display name for the UDC file |
Description |
Element |
Description of the UDC file |
Type |
Element |
Connection type |
Type/@MajorVersion |
Attribute |
Optional: should be 2 if used |
Type/@MinorVersion |
Attribute |
Optional: should be 0 if used |
Type/@Type |
Attribute |
Type of the data connection. One of the following values: SharePointList SharePointLibrary Database XmlQuery XmlSubmit WebService |
ConnectionInfo |
Element |
Connection-specific information |
The ConnectionInfo Element
<udc:ConnectionInfo Purpose="WriteOnly">
<udc:WsdlUrl/>
<udc:SelectCommand/>
<udc:UpdateCommand/>
<udc:Authentication/>
</udc:ConnectionInfo>
Name | Type | Description |
---|---|---|
ConnectionInfo |
Element |
Container element |
ConnectionInfo/@Purpose |
Attribute |
Determines whether the connection is for query or submit. Possible values:
|
WsdlUrl |
Element |
Fully-qualified URL to the WSDL for a Web Service |
SelectCommand |
Element |
Details of the query connection |
UpdateCommand |
Element |
Details of the submit connection |
Authentication |
Element |
Server-specific authentication information |
The SelectCommand Element
<udc:SelectCommand>
<udc:ListId/>
<udc:WebUrl/>
<udc:ConnectionString/>
<udc:OperationName/>
<udc:ServiceUrl UseFormsServiceProxy=""/>
<udc:SoapAction/>
<udc:Query/>
</udc:SelectCommand>
Name | Type | Description |
---|---|---|
SelectCommand |
Element |
Container element |
ListId |
Element |
GUID for a SharePoint List connection |
WebUrl |
Element |
URL to the Web site containing the SharePoint List |
ConnectionString |
Element |
Database Connection string |
ServiceUrl |
Element |
Web Service Service URL |
ServiceUrl/@UseFormsServiceProxy |
Attribute |
Determines whether the Web Service connection should use the Forms Service proxy |
SoapAction |
Element |
Web Service SoapAction |
Query |
Element |
Specific query or URL – used by multiple connection types |
The UpdateCommand Element
<udc:UpdateCommand>
<udc:OperationName/>
<udc:ServiceUrl/>
<udc:SoapAction/>
<udc:Submit/>
<udc:FileName/>
<udc:FolderName AllowOverwrite="1"/>
</udc:UpdateCommand>
Name | Type | Description |
---|---|---|
UpdateCommand |
Element |
Container Element. |
OperationName |
Element |
Web Service operation name. |
ServiceUrl |
Element |
Web Service Service URL. |
ServiceUrl/@UseFormsServiceProxy |
Attribute |
Determines whether the Web Service connection should use the Forms Service proxy. |
SoapAction |
Element |
Web Service SoapAction. |
Submit |
Element |
Specific query or URL – used by multiple connection types. |
FileName |
Element |
Default file name for a SharePoint Library submit. |
FolderName |
Element |
URL to the SharePoint library to submit to. |
FolderName/@AllowOverwrite |
Attribute |
Determines whether to overwrite a file in a SharePoint library if it already exists. |
The Authentication Element
<udc:Authentication>
<udc:UseExplicit CredentialType="">
<udc:UserId/>
<udc:Password/>
</udc:UseExplicit>
<udc:SSO AppId="" CredentialType=""/>
</udc:Authentication>
Name | Type | Description |
---|---|---|
Authentication |
Element |
Container element. |
UseExplicit |
Element |
Contains plaintext username and password to be used on the server for authentication. |
UseExplicit/@CredentialType |
Attribute |
Describes how the contained credential is to be used. Possible values:
|
UserId |
Element |
UserID to use for authentication. |
Password |
Element |
Plaintext password to use for authentication. |
SSO |
Element |
Specifies an Office single Sign-on Application definition to use for authentication. |
SSO/@AppId |
Attribute |
The application name from SSO. |
SSO/@CredentialType |
Attribute |
Describes how the contained credential is to be used. Possible values:
|
CredentialType Values
Value | Description |
---|---|
Sql |
Credentials will be embedded in a database connection string for authentication against a SQL server. |
NTLM |
Credentials will be used to impersonate a Windows user. |
Kerberos |
Credentials will be used to impersonate a Windows user using Kerberos. |
CD |
The username will be used to impersonate a Windows user using Constrained delegation. |
Basic |
Credentials will be used to perform HTTP Basic authentication. |
Digest |
Credentials will be used to perform HTTP Digest authentication. |
Required Properties by Connection Type
Web Service
Property | Value |
---|---|
DataSource/Type/@Type |
WebService |
ConnectionInfo/@Purpose |
ReadOnly SelectCommand element contains Web Service query settings. WriteOnly UpdateCommand element contains Web Service submit settings. ReadWrite Both SelectCommand and UpdateCommand are present. |
ConnectionInfo/WsdlUrl |
Fully-qualified URL to the WSDL for the Web Service |
ServiceUrl |
Web Service Service URL |
ServiceUrl/@UseFormsServiceProxy |
Determines whether the Web Service connection should use the Forms Service proxy |
SoapAction |
Web Service SoapAction |
Database
Property | Value |
---|---|
DataSource/Type/@Type |
Database |
ConnectionInfo/@Purpose |
ReadOnly InfoPath determines at design time whether a database connection can support submit. |
SelectCommand/ConnectionString |
Database connection string |
SelectCommand/Query |
SQL query to perform |
SharePoint List
Property | Value |
---|---|
DataSource/Type/@Type |
SharePointList |
ConnectionInfo/@Purpose |
ReadOnly |
ListId |
GUID of the Sharepoint list |
WebUrl |
URL to the containing site for the list |
SharePoint Library Submit
Property | Value |
---|---|
DataSource/Type/@Type |
SharePointLibrary |
ConnectionInfo/@Purpose |
WriteOnly |
FileName |
Default file Name for a SharePoint Library submit. |
FolderName |
URL to the SharePoint library to submit to. |
FolderName/@AllowOverwrite |
Determines whether to overwrite a file in a SharePoint library if it already exists. |
HTTP Post
Property | Value |
---|---|
DataSource/Type/@Type |
XmlSubmit |
ConnectionInfo/@Purpose |
WriteOnly |
UpdateCommand/Submit |
URL that specifies the target of the post. |
XML File
Property | Value |
---|---|
DataSource/Type/@Type |
XmlQuery |
ConnectionInfo/@Purpose |
ReadOnly |
SelectCommand/Query |
URL of the XML source to query. |
The UDC v2.0 Schema
Copy the following XML schema and paste it into a text editor such as Notepad, then save as UDC20.xsd in order to use the schema for UDC file generation, reference and custom validation. In Visual Studio 2005, this schema can provide Intellisense autocompletion if copied to the Visual Studio schema cache, typically located at <drive>:\Program Files\Microsoft Visual Studio 8\Xml\Schemas.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema targetNamespace="https://schemas.microsoft.com/office/infopath/2006/udc" xmlns:udc="https://schemas.microsoft.com/office/infopath/2006/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="DataSource">
<xsd:complexType>
<xsd:all>
<xsd:element ref="udc:Name" minOccurs="0" />
<xsd:element ref="udc:Description" minOccurs="0"/>
<xsd:element ref="udc:Type" minOccurs="0"/>
<xsd:element ref="udc:ConnectionInfo" minOccurs="0"/>
</xsd:all>
<xsd:attribute name="MajorVersion" type="xsd:integer"/>
<xsd:attribute name="MinorVersion" type="xsd:integer" />
</xsd:complexType>
</xsd:element>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="Description" type="xsd:string"/>
<xsd:element name="Type">
<xsd:complexType>
<xsd:attribute name="MajorVersion" type="xsd:integer"/>
<xsd:attribute name="MinorVersion" type="xsd:integer"/>
<xsd:attribute name="Type" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="ConnectionInfo">
<xsd:complexType>
<xsd:all>
<xsd:element ref="udc:WsdlUrl" minOccurs="0"/>
<xsd:element ref="udc:SelectCommand" minOccurs="0"/>
<xsd:element ref="udc:UpdateCommand" minOccurs="0"/>
<xsd:element ref="udc:Authentication" minOccurs="0"/>
</xsd:all>
<xsd:attribute name="Purpose" type="xsd:string"/>
<xsd:attribute name="AltDataSource" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="WsdlUrl" type="xsd:string"/>
<xsd:element name="FileName" type="xsd:string"/>
<xsd:element name="FolderName">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="AllowOverwrite" type="xsd:boolean"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="SelectCommand">
<xsd:complexType>
<xsd:all>
<xsd:element ref="udc:ListId" minOccurs="0"/>
<xsd:element ref="udc:WebUrl" minOccurs="0"/>
<xsd:element ref="udc:ConnectionString" minOccurs="0"/>
<xsd:element ref="udc:ServiceUrl" minOccurs="0"/>
<xsd:element ref="udc:SoapAction" minOccurs="0"/>
<xsd:element ref="udc:Query" minOccurs="0"/>
</xsd:all>
<xsd:attribute name="Type" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="ListId" type="xsd:string"/>
<xsd:element name="WebUrl" type="xsd:string"/>
<xsd:element name="ConnectionString" type="xsd:string"/>
<xsd:element name="ServiceUrl">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="UseFormsServiceProxy" type="xsd:boolean"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
<xsd:element name="SoapAction" type="xsd:string"/>
<xsd:element name="Query" type="xsd:string"/>
<xsd:element name="Submit" type="xsd:string"/>
<xsd:element name="UpdateCommand">
<xsd:complexType>
<xsd:all>
<xsd:element ref="udc:ServiceUrl" minOccurs="0"/>
<xsd:element ref="udc:SoapAction" minOccurs="0"/>
<xsd:element ref="udc:Submit" minOccurs="0"/>
<xsd:element ref="udc:FileName" minOccurs="0"/>
<xsd:element ref="udc:FolderName" minOccurs="0"/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element name="Authentication">
<xsd:complexType>
<xsd:all>
<xsd:element ref="udc:UseExplicit" minOccurs="0"/>
<xsd:element ref="udc:SSO" minOccurs="0"/>
</xsd:all>
</xsd:complexType>
</xsd:element>
<xsd:element name="UseExplicit">
<xsd:complexType>
<xsd:all>
<xsd:element ref="udc:UserId" minOccurs="0"/>
<xsd:element ref="udc:Password" minOccurs="0"/>
</xsd:all>
<xsd:attribute name="CredentialType" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="UserId" type="xsd:string"/>
<xsd:element name="Password" type="xsd:string"/>
<xsd:element name="SSO">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="AppId" type="xsd:string"/>
<xsd:attribute name="CredentialType" type="xsd:string"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:schema>
See Also
Concepts
How to: Create and Use a Data Connection Library
About Data Connections, Authentication, and Alternate Access Mapping