- Editor Details
- Flat-File Specifications
- Property Promotion and Property Schemas
- Using InfoPath Documents with BizTalk
- Summary
Using InfoPath Documents with BizTalk
We've spent a lot of time creating message schemas with the intention of using them to process inbound and outbound messages. Little thought has been given to how the information will enter BizTalk. It's just been assumed that some application will submit messages. To show you that it need not be a matter of endless custom development, we'll take a very brief look at Microsoft Office InfoPath, a tool that takes standard schema or Web service metadata and creates client forms that can submit XML or Web service messages via HTTP.
InfoPath is a brand new addition to the Microsoft Office 2002 suite. The basic concept is to create forms that are backed by generated code that turns form input into HTTP messages. Of course, we've been doing that for years using HTML and script. The benefit that InfoPath brings to Web development is its capability to consume metadata in some standard form and offer a palette of form controls that are compatible with the information presented.
The metadata may be in the form of an XSD document or a WSDL document, the "schema" for a Web service. Having just created a host of XSD schemas, we are in an ideal position to create an InfoPath form.
Opening the InfoPath design time editor, we look to the right palette and find New from Data Source under the Design a New Form heading. We use the wizard to browse to DerivedXMLSchema.xsd, which you'll recall pertains to Contact messages. We are prompted to make some selections, namely how many times we want the Choice group repeated and which choiceHome or Officeto make. We can modify this later, but for now, we choose a single instance of Office. When we close the wizard, the right control palette looks like Figure 3.5. We can then drag the controls onto the design surface to create the form shown in the view to the left of that figure.
Figure 3.5 Sample InfoPath form submits a Contact message via HTTP.
We can save the form to a Web server. Persons who want to submit a contact enter the URL for the form, receive it in their Web browser, and fill it out. When they click the Submit button, an XML message conforming to our schema is generated and submitted to the URL configured into the form. In later chapters, we'll use InfoPath to create data entry clients for orchestrations. By virtue of the fact that BizTalk works with open standards, we are able to leverage another application to generate applications that can talk to BizTalk using standard messaging protocols.