InfoPath and the Web Service Data Source


During the design of an InfoPath form that will use the Web Service data source, a data structure is built on the operations selected within the Web Service. This results in forms that easily submit data or query data through a Web Service. Using a Web Service as the data source for an InfoPath form is essentially the same connection paradigm that we have done in previous chapters. Several restrictions are placed on the Web Service data source to guarantee compatibility with existing Web Services. When you re submitting forms directly to Web Services, it is important to remember that developers cannot modify existing fields and groups within the data source. However, they can modify additional fields within the root of the data source that are considered outside of the defined WSDL schema. InfoPath also allows you to do custom script based on standard HTTP submits.

Forms that Submit Data

 CD-ROM     InfoPath enables you to design a form that can directly submit its data to a Web Service. (This feedback service application is available on the companion CD-ROM, in \Code\Chapter 4\FeedBackServiceSetup\WebService\Setup.exe.) This provides developers with an easy-to-use data-collection form that provides a direct submit or receive from a Web Service. Figure 4.15 shows the selection screen for deciding the type of connection.

click to expand
Figure 4.15: Defining the connection type for the Web Service.

Once the type of submission is defined for the InfoPath form, we can either search UDDI or enter the Web Service URL to the published WSDL, as shown in Figure 4.16.

click to expand
Figure 4.16: Providing the Web Service parameters.

Once the data source is found, InfoPath then brings down the WSDL and determines the valid operations defined by the Web Service, as shown in Figure 4.17.

click to expand
Figure 4.17: Defining the connection type for the Web Service.

Once these are defined, the data source is populated and the form may be laid out within the sections for data entry, as shown in Figure 4.18.

click to expand
Figure 4.18: Designing the Interview Feedback form.

It is important to understand that the individual data elements are appended to the default InfoPath namespace, as shown within the Properties tab in Figure 4.19.


Figure 4.19: Reviewing the default namespace assignment.

By default, all submissions to a Web Service require that there be an available connection to the network and to the Web Service. However, InfoPath allows forms to be saved locally, and this can be used to provide offline access to data. This means that users can save either a completed or partially completed form to their local system. Once a connection is established to the server, users can then submit their forms to the specified Web Service.




Programming Microsoft Infopath. A Developers Guide
Programming Microsoft Infopath: A Developers Guide
ISBN: 1584504536
EAN: 2147483647
Year: 2006
Pages: 111
Authors: Thom Robbins

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net