One of the powerful features of InfoPath, especially when it comes to generating browserbased forms, is the ability to connect to additional data sources. We can reuse our earlier Demonstration Equipment Request form to see this in action.
TIPFor demonstration purposes, SQL connections are easiest to use. However, their usefulness within InfoPath forms is pretty limited. Passing parameters generally requires custom code, as you’ll see later. As a general rule, the best way to communicate with external data sources is to create a custom web service interface. InfoPath can then parse the Web Service Definition Language (WSDL) and create fields for any parameters that may be required. To provide some sample data to work within our various examples, we need to download and install the SQL Server 2008 sample databases. Our examples make use of the AdventureWorksLT database installed on the local instance of SQL Server 2008.
Data Connection Libraries
When we added our data connection, the connection details were stored along with the InfoPath form. This technique is known as “embedding connection details.” In simple cases, this approach works well; however, in larger developments, such a technique may not be appropriate. Often multiple environments exist for testing, staging, and production. Embedding connection details within a form template would require the template to be changed for each environment. Also, if an embedded connection contains user credentials, these are stored as plain text within the file. To get around problems like this and to promote the reuse of administrator controlled data connections, InfoPath can save data connections to a data connection library. To create a new data connection library, take the following steps:
We can now publish the data connection from our Demonstration Equipment Request form by taking the following steps:
Modifying UDC Files
By default, our data connection is configured to use Integrated Windows Authentication. This means that connections to the data store are made using the credentials of the user viewing the form. There are, however, a few problems with this approach. Probably the most obvious is that all users accessing the form must have permissions to the underlying data store. Another problem that isn’t so apparent is what’s known as the “double-hop issue.” NT LAN Manager (NTLM) doesn’t allow credentials to be delegated by an intermediary system. This is a problem when using InfoPath Forms Services, because the credentials are captured on the user interface tier, but it is the middle tier, the InfoPath Forms Services layer, that actually connects to the data source. Since the middle tier can’t impersonate the user connected to the user interface tier, it’s not possible to connect to a data source on a separate server using Integrated Windows Authentication.
You can, however, deal with this problem in a few ways: One way is to make use of the Secure Store Service The other way is to embed a username and password in the connection details. Although using the Secure Store Service is the most secure option, for the purposes of this demonstration, we’ll use embedded credentials.
Our connection file is now set up to use embedded connection credentials and will work properly for all users accessing it.
NOTE Within the UDC file is a udc: Authentication element that’s commented out by default. To configure the connection to use Secure Store Service for authentication, uncomment this section. The AppId is the Target Application Id and the CredentialType will either be NTLM for Windows authentication or SQL for SQL Authentication.
Share Point 2010 Related Interview Questions
|Web Services Interview Questions||XML Interview Questions|
|Share Point 2010 Interview Questions||ASP.NET Interview Questions|
|Share Point Administration Interview Questions||BizTalk Admin Interview Questions|
|Microsoft Office SharePoint Server (MOSS) Interview Questions||Biztalk Server Interview Questions|
|Asp Dot Net Mvc 4 Interview Questions||Biztalk Esb Toolkit Interview Questions|
|InfoPath Interview Questions|
Share Point 2010 Tutorial
The Microsoft Sharepoint 2010 Platform
Developing With Sharepoint 2010
Presentation Layer Overview
Client Object Model
Infopath Forms Services
Enterprise Content Management
User Interface Customization
Application Services Overview
Service Application Framework
Word Automation Services
Data Access Overview
Linq To Sharepoint And Spmetal
Business Connectivity Services
User Profiles And Social Data
Packaging And Deployment Model
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.