Plan server-side data connections needed for form templates (Office Forms Server)
Updated: May 21, 2009
Applies To: Office Forms Server 2007
Topic Last Modified: 2009-05-11
In this article:
A data connection is a dynamic link between a form template and a data source that stores or provides data for the form template. A form template must have one primary data connection, called the main data connection, and it can optionally have one or more secondary data connections. The main data connection defines the main data source of the form template, which is the XML schema that determines how data is stored. The one main data connection allowed on a form template is created automatically when you create the template. You can create as many secondary data connections as you like when you design a form template.
The Microsoft Office InfoPath 2007 designer supports a number of different data connections, which can be used both in the Office InfoPath 2007 program and in Microsoft Office Forms Server 2007. Office InfoPath 2007 form template designers can develop a form template once and publish it both for the rich client and for the browser using Office Forms Server 2007. If data connections are used within a browser-enabled form template, the form template calls data connections that are resident in Office Forms Server 2007. This topic describes how server-side data connections function when a form template is deployed.
To plan what data connections you will need, gather the following information:
What forms currently exist in your organization
What application or systems you want to send the data to
The following are scenarios that show how data connections can be used in conjunction with Office Forms Server 2007.
April logs onto her computer on the corporate intranet. She browses to her group's SharePoint site and opens an expense report form template from a document library. Because she does not have Office InfoPath 2007 installed, the form is instantiated in her browser. She fills out the form and clicks "Submit." The form is submitted by e-mail to her Accounts Payable department. The mail is delivered to A/P's e-mail box and the "Sender" field shows that the form was sent by "Office Forms Server." Because April is authenticated on the LAN by NTLM, the message's Subject line begins with "Submitted by April Meyer:" Meanwhile, April simply receives confirmation that her form has been submitted.
The next time April has an expense report to submit, she is traveling to a conference. Using the free wireless Internet at her hotel, she logs into her company's extranet. She is prompted to enter her user name and password. Once she is authenticated, she accesses her expense report form in her browser. When she submits the form, she receives confirmation that the form was submitted. Behind the scenes, mail is sent to A/P as described in the first scenario. Because April is authenticated on the LAN using Basic authentication, the message once again has her name on the Subject line.
Tim works for the IT department at Linfield College. He sets up a BizTalk orchestration to handle admissions applications. He chooses to have the application forms, which are in XML format, submitted using BizTalk's ISAPI adapter. Melissa, who works at the Admissions desk at Linfield, enters the data from the applications that have been submitted by means of postal mail into the application form using InfoPath. When she submits the form, an HTTP post occurs, sending the data to the BizTalk queue.
Office Forms Server 2007 uses the E-mail data connection to submit e-mail messages in MIME format on behalf of the user, using mail functionality provided with Windows SharePoint Services 3.0. An e-mail message is sent using the credentials of the account under which the forms server is running. All configuration of this mail service is done by the server administrator. For information about configuring e-mail on Windows SharePoint Services 3.0, see the Windows SharePoint Services Administrator's Guide.
The Database data connection looks up information in a database to populate form fields. You can use this connection to look up data in Microsoft SQL Server, or in any ODBC-compliant database. The Database data connection is query-only and cannot be used to submit data to a database. If you want to use a form to submit data, you should use the Web service data connection.
The Database data connection can authenticate requests to the database in different ways, depending on the security level of the form template that is being used to render the form. Administrator-approved form templates can be designed to have full trust, which means that any business logic or code that runs in the form is authenticated as the Office Forms Server 2007 service account unless another authentication method is specified in the form template. Forms that are not running in full trust can only access a database that exists in the same domain as the server running Office Forms Server 2007, and database queries are authenticated either as the user or the account specified in the configuration database. In this case, if authentication fails, a prompt appears in which the user can specify a user name and password to connect to the database.
The HTTP post data connection enables an InfoPath form to post data to an application server using an HTTP post function. The HTTP post originates from the Office Forms Server 2007 server.
If the HTTP post data connection is used in a form template running in full trust, then cross-domain HTTP posts can be made. If the form template does not have full trust, HTTP posts can only be made to servers in the same domain as the Office Forms Server 2007 server. Before performing an HTTP post, Office Forms Server 2007 calls an API method, passing the host name of the computer specified in the connection file to determine whether a connection can be made to that server within the current security context.
The SharePoint library submit data connection enables forms to be published directly to a SharePoint document library. The connection uses the current user identity to access the SharePoint site.
Before submitting a form to a document library, Office Forms Server 2007 calls an API method, passing the host name of the computer on which the data source resides to determine whether the form can connect to that server within the current security context.
The SharePoint list data connection is a query-only connection used to populate InfoPath form fields from an existing SharePoint list.
When this data connection is used, the server calls an API method, passing the host name of the server to determine whether the form can connect to that server within the current security context.
The Web service data connection can submit data to a Web service and use the return data to update fields in the originating form. This connection collects form data as query parameters, wraps the data in a SOAP envelope, and submits it to a Web service. The connection then obtains the returned SOAP message containing return data or, in the case of failure, error-message data. A Web service connection can be created as a query connection or as a submit connection.
The XML file data connection connects to an XML file specified when the form template is designed, and it uses the data from the XML file to populate form fields. Form template designers can also choose to include the XML file in the form template itself, which reduces resource-management issues associated with connecting to an external resource.
This topic is included in the following downloadable book for easier reading and printing: