Module 7: Integrating with Adapters Time estimated: 120 minutes Module objective: In this module, you will learn how to identify the various adapter types and how to configure adapters for use in an integration scenario. Overview Because Microsoft® BizTalk® Server 2010 must be able to exchange messages with a variety of other systems and applications, specialized adapters are required. An adapter is a COM or Microsoft .NET–based software component that provides the functionality required to interface with different types of applications and sometimes proprietary communications mechanisms. This module explains how adapters work and shows you how to configure specific types of adapters that are included with BizTalk Server 2010. Lesson 1: Introduction to BizTalk Adapters Lesson objective: Describe how adapters are used to create integration solutions and how the BizTalk Adapter Framework can be used to create custom adapters. Introduction BizTalk Server 2010 includes a number of adapters that can access common data storage locations, such as email servers, file servers, web servers and SharePoint servers. BizTalk Server 2010 also offers a variety of adapters for connecting to third-party applications. This lesson shows you how to use adapters to connect BizTalk Server to external systems and applications. What Is an Adapter? Explain what adapters are and how they are used. Adapters BizTalk adapters are the first and last software components used by BizTalk Server to exchange messages with disparate applications and systems. An adapter is a software component that enables messages to be received or sent by BizTalk Server using a specific delivery mechanism. This mechanism is commonly a recognized standard, such as HTTP, FTP, or POP3, but it could also be a method of communicating with a proprietary third-party application, such as a vendor’s Enterprise Resource Planning (ERP) application. How Adapters Work The role of an adapter is to enable communications between BizTalk Server and external systems and trading partners. Users configure adapters by creating send ports and receive locations that define the properties for given instances of the adapter. Most adapters support both send and receive operations, whereas other adapters support communication in only one direction. A receive adapter works in conjunction with a receive port and a receive pipeline to retrieve messages from the source location (an endpoint); it saves the messages in the MessageBox database. Each receive adapter has specific context information about the message (metadata) that is associated with the protocol that it supports. This metadata can include information such as the original file name, the time the message was received, and the sender information. The metadata is saved along with the message data and can be accessed by send ports, send port groups, and orchestrations when necessary for routing purposes and to make general processing decisions within an orchestration. For sending messages, the send port adapter and pipeline work together via the messaging engine to send the message from the MessageBox database to a specific endpoint. Sources of Adapters Describe several sources for BizTalk Server adapters. Adapter Sources You can acquire an appropriate BizTalk adapter through four primary sources: Standard BizTalk Server 2010 adapters. These adapters, also known as native adapters, are included in the installation of BizTalk Server 2010. The standard adapters include Base EDI, FILE, FTP, HTTP, WebsSphere MQ, MSMQ, POP3, SMTP, SOAP, SharePoint and WCF adapters. Multiple instances of each adapter can be configured by adding multiple receive locations and send ports. The FTP adapter has been improved, adding support for secure FTP. BizTalk Server 2010 Adapter Pack. Microsoft makes available additional specialized adapters for connecting BizTalk Server to a number of proprietary systems. The release of the BizTalk Server 2010 Adapter Pack includes updated adapters that support the latest versions of JD Edwards, Oracle eBS, SAP and Siebel. These adapters can be installed individually as required. A complete list of the BizTalk Server 2010 adapters is available on the Microsoft web site. Third-party adapters. Third-party adapters can be purchased by companies who specialize in developing adapters or from companies that provide adapters to enable integration with their proprietary applications. Examples of third-party adapters include Lotus Notes, and CICS. Once the adapter has been installed, you can use the BizTalk Administration console to configure these adapters. If an adapter is no longer required, it can be removed without the need to reconfigure the BizTalk application. Custom adapters. A custom adapter could be required if no adapter exists for a system or application to integrate with BizTalk Server 2010. Microsoft provides the BizTalk Adapter Framework documentation and a software development kit (SDK) toolkit for developers to use for creating custom adapters. What Is the BizTalk Adapter Framework? Describe the purpose of the BizTalk Adapter Framework. Adapter Framework Microsoft provides the BizTalk Adapter Framework to enable developers to create custom adapters for interfacing and integrating with a proprietary system or with a system unsupported by existing adapters. This framework provides a common means of creating and implementing adapters and includes the specifications for building BizTalk adapters using open standards based on Web Services. The Adapter Framework consists of a set of extensible APIs that enable developers to access relevant BizTalk Server services used to integrate applications and platforms. Once an adapter has been built for BizTalk Server by using the Adapter Framework, the standard BizTalk administration tools can be used to manage and configure the adapter. The Adapter Framework is provided as part of the BizTalk Server 2010 product SDK. Lesson 2: Configuring a BizTalk Adapter Lesson objective: Describe how to configure the three types of BizTalk adapters. Overview Configuring a BizTalk Server 2010 adapter involves setting the properties required for the adapter to communicate among BizTalk Server, external systems and trading partners. In this lesson, you will learn about the difference between a protocol adapter, a WCF adapter, and an application adapter, and you will learn how to configure adapters. Configuring an Adapter Describe how to configure the FILE adapter. Adapter Configuration Each adapter must be configured with specific properties to enable it to function. The properties differ depending on how the adapter will connect to the intended endpoint. For example, an FTP adapter has specific settings that are unique to the FTP protocol and the specific FTP server that it must connect to. This includes properties such as the polling interval, logon user name, and the password. Obviously, these properties would not be appropriate for the FILE adapter. Adapters also have default global properties that can be modified through the BizTalk Administration console. The global settings are augmented or can be overridden for a specific adapter that is configured though a receive or send port. Because adapter configurations contain potentially sensitive information, such as connection strings and logon credentials for external systems, the configuration information is encrypted and stored in the Single Sign-On (SSO) database at design time. At run time, the Messaging Engine retrieves the configuration for the adapter. You can add instances of an adapter by using the BizTalk Administration console. File Adapter The FILE receive adapter reads files from a folder on the local file system or on a network share. Secure access through the network share can be maintained by setting appropriate user account permissions and configuring the adapter to use the required user account. The FILE receive adapter creates a BizTalk Message object so that BizTalk Server can process the message. The FILE send adapter transmits messages from the MessageBox database to a specified destination address. The destination address is defined by a file path and file name using macros (wildcard characters) related to the message context properties. The FILE send adapter gets the message content from the body of the BizTalk Message object, and after the message is processed by the pipeline, the adapter writes the message to a file and then deletes the message from the MessageBox database. The FILE adapter writes files to the file system either directly or by using the lazy write-behind cache, which can improve performance, particularly for large files. Integrating with Protocol Adapters Identify and describe BizTalk protocol adapters. Protocol Adapters Protocol adapters process messages by using common networking protocols. The protocol adapters that are included with a BizTalk Server 2010 installation include: FTP. The FTP adapter enables you to move messages between BizTalk Server and an FTP server. The FTP receive adapter allows you to pull files from the FTP server on demand by polling on a configurable schedule. The FTP send adapter sends messages to the configured FTP site on demand. BizTalk Server 2010 includes an improved FTP adapter that supports secure FTP, and it can also handle downloading from read-only locations. The new FTP adapter maintains a list of previously downloaded file names to avoid reading the same file more than once. The list is stored in the MessageBox database. HTTP. The BizTalk HTTP adapter provides support for communication with external systems by using industry-standard HTTP GET and PUT functionality. You can also configure appropriate proxy settings to support your network configuration. As is the case with most of the adapters, there are also several new performance counters for the HTTP adapter available to you in Performance Monitor. MSMQ. With the BizTalk 2010 adapter for MSMQ, you can send and receive messages to Microsoft Message Queuing (MSMQ) queues. This adapter works with transactional and nontransactional, public and private, and local and remote queues. The MSMQ BizTalk adapter supports large messages (greater than 4 MB) and provides access to other features, such as messaging over HTTP and multi-cast messaging. POP3. The POP3 adapter is a built-in adapter that enables BizTalk applications to poll for e-mail messages and their attachments from a mailbox by using the POP3 protocol. The POP3 adapter can be used to retrieve e-mail messages from Microsoft Exchange, the Windows Server POP3 Service, or any third-party POP3-compliant system. Configurable properties for the POP3 adapter include mandatory properties such as the name of the mail server, the user name and password for the mail server, and the polling interval. All of these settings are securely stored in the Enterprise Single Sign-On (SSO) database. SMTP. The Simple Mail Transfer Protocol (SMTP) adapter enables messages to be sent to other applications by creating an e-mail message and delivering it to a specified e-mail address. The target e-mail address is a property of the SMTP adapter. By default, the message text of SMTP messages is plain text, but you can also configure the adapter to use the contents of an HTML file or a text file as the message body. These features, plus the ability to send multiple attachments, are new features of the SMTP adapter for BizTalk Server 2010. WebSphere MQ. The WebSphere MQ adapter acts as a bridge between BizTalk Server and an IBM WebSphere MQ messaging system. You can use this adapter to send and receive messages from local and remote queues, transmission queues, and alias queues. One new feature of the WebSphere MQ adapter is the ability to perform dynamic receives as part of solicit-response. SOAP. The SOAP adapter has been superseded by the WCF adapters. It is still included with BizTalk Server 2010 in order to maintain backward compatibility. The SOAP adapter actually consists of two adapters: the SOAP receive adapter and the SOAP send adapter. The SOAP receive adapter works through the Microsoft ASP.NET runtime via Web services and passes messages to BizTalk Server through the Isolated Host adapter. The SOAP send adapter is used to call a Web service from BizTalk Server. This adapter also supports SSO, which is used for secure access through Web services. FTP Adapter Improvements in BizTalk Server 2010 Describe the new and enhanced features of the FTP adapter available in BizTalk Server 2010. Secure File Transfers The FTP adapter in BizTalk Server 2010 provides support for file transfers from an FTPS server over Secure Sockets Layer (SSL)/Transport Level Security (TLS). SSL/TLS ensures data confidentiality through encryption. You must enable the secure mode by configuring SSL-specific properties provided by the adapter. Because the adapter allows for both reading and writing data from a secure FTP server, the SSL-specific properties are available when configuring send handlers/ports and also with receive handlers/locations. Support for Downloads from Read-only Locations In the previous releases of BizTalk Server, the FTP adapter deleted the file after downloading so that the file didn’t download again in the next polling cycle. Due to this design, the adapter was limited to download files only from FTP locations that provided write access. In BizTalk Server 2010, the FTP adapter supports download of files from read-only file locations. The adapter now maintains a list of downloaded files in a database. For the next download, the list of files on the FTP server is compared to the list of files maintained by the adapter, and only new files on the server are downloaded. To support scenarios where an existing file is updated between two downloads, you can configure the adapter to also check file timestamps Support for Atomic Transfer in ASCII Mode The FTP adapter available with the previous releases of BizTalk Server provided atomic file transfer only for binary mode. In BizTalk Server 2010, the FTP adapter is enhanced to also support atomic file transfer for ASCII mode. To enable atomic file transfer for ASCII mode, the adapter uses the Temporary Folder property. This property defines a temporary location on the FTP server where the file is first moved to. After the file is completely transferred to the temporary location, the file is then moved to the relevant location on the FTP server. Here, the assumption is that the file transfer is atomic between the temporary location and the relevant location on the FTP server. Demonstration: Configuring a Protocol Adapter Learn how to create a receive port and a receive location configured with the FTP adapter. The following demonstration is dependent upon the completion of the demonstrations contained in Module 5, “Routing BizTalk Messages.” If you have not already completed the demonstrations in this module, deploy the Messaging project in the C:\AllFiles\DemoCode\Module7\Demo folder, import the Demo.Bindings.Complete.xml binding file from C:\AllFiles\DemoCode\Module5, and then start the Demos application. Configure the FTP Adapter on a Receive Location 1. Open the BizTalk Server Administration Console, and then expand BizTalk Server Administration, BizTalk Group, Applications, and then click Demos. 2. Right-click Receive Ports, point to New, and then click One-way Receive Port. 3. In the Receive Port Properties dialog box, in the Name box, type Shipments, and then in the left pane of the Receive Port Properties dialog box, click Receive Locations. 4. Click the New button. 5. In the Receive Location Properties dialog box, in the Name box, type ShipmentsFTP, in the Type list, click FTP, and then click Configure. Here you are creating a receive location that will use the FTP adapter to pick up messages for processing by the orchestration. 6. In the FTP Transport Properties dialog box, under the FTP section, in the Folder box, type ShippedOrders. 7. In the File Mask box, type *.xml. 8. In the Password box, type pass@word1. 9. In the Server box, type BIZTALKDEMO. 10. In the User Name box, type Administrator, and then click OK. 11. In the Receive Location Properties dialog box, in the Receive pipeline list, click XMLReceive, and then click OK. 12. In the Receive Port Properties dialog box, click OK. 13. Pause the bt10d-demos virtual machine. Integrating with WCF Adapters Describe how the BizTalk WCF adapters are used to send and receive messages. Introduction Windows Communication Foundation (WCF). The BizTalk WCF adapters allow BizTalk Server to communicate with service-based interfaces of other applications, including database servers such as SQL Server 2008 and Oracle 11g. The WCF adapters offer a new and more flexible way to access data. The BizTalk WCF adapters include five physical adapters that represent the WCF predefined bindings: WCF-WSHttp: This adapter provides WS-* standards support over the HTTP transport. WCF-BasicHttp: This adapter provides communicates with ASMX-based Web services and clients and other services that conform to the WS-I Basic Profile 1.1. WCF-NetTcp: This adapter provides WS-* standards support over the TCP transport. WCF-NetMsmq: This adapter provides support for queuing by leveraging Microsoft Message Queuing (MSMQ) as a transport. WCF-NetNamedPipe: This adapter provides secure optimization for on-machine crossprocess communication using named pipes. WCF-Custom: This adapter allows you to configure a WCF binding and the behavior information for the receive location and send port, and take advantage of the WCF extensibility features. WCF-CustomIsolated: This adapter allows you to configure a WCF binding and the behavior information for the receive location running in an isolated host, and take advantage of the WCF extensibility features over the HTTP transport. WCF-Custom Adapter The WCF-Custom adapter replaces the SQL adapter that was included in previous versions of BizTalk. With the WCF-Custom adapter, BizTalk Server can exchange messages to and from a Microsoft SQL Server™ 2008 and Oracle 11g databases. You can use the WCF-Custom adapter to poll data from one or more data tables or stored procedures and retrieve the data and place it in a BizTalk messaging solution or into an orchestration as one or more XML messages. You can also use the WCF-Custom adapter to insert, update, or delete data in SQL Server 2008 and Oracle 11g tables. This adapter can be configured by using the BizTalk Administration console. The WCF adapters will be covered in more detail in Module 13 “Using WCF Receive Adapters” and Module 14 “Using WCF Send Adapters”. Demonstration: Configuring a WCF Adapter Learn how to create WCF-Custom metadata that BizTalk uses to communicate with SQL Server. This metadata is in the form of a schema and special orchestration port types. Generate WCF-Custom Adapter MetaData 1. Resume the bt10d-demos virtual machine. 2. In Windows Explorer, navigate to and open C:\AllFiles\DemoCode\Module7\Demo\Demo.sln. 3. In Solution Explorer, right-click the Messaging project, point to Add, and then click Add Generated Items. 4. In the Add Generated Items – Messaging dialog box, click Consume Adapter Service, and then click Add. You will use the Add Adapter Wizard to generate a schema, an orchestration, a special port type, and a multi-part message type, all of which can be used to update a SQL table 5. In the Consume Adapter Service dialog box, in the Select a binding list, click sqlBinding, then click Configure. 6. In the Configure Adapter dialog box, on the Security tab, in the Client credential type list, click Windows. 7. On the URI Properties tab, set the Server property to BIZTALKDEMO. Set the InitialCatalog property to AdvWorks, and then click OK. 8. In the Consume Adapter Service dialog box, click the Connect button. 9. In the Select a category tree, expand Tables and click [dbo].[LOANS]. 10. In the Available categories and operations list, click Insert, and then click Add. 11. In the Filename Prefix box, enter gen-. 12. Click OK to close the Consume Adapter Service dialog box. This process has created a set of schemas defining the message types that BizTalk can use to communicate with SQL Server 2008 via WCF. Examine the WCF-Custom Adapter MetaData 1. Notice that three schema files and an XML file were created, and added in Solution Explorer. The XML file contains send port configuration settings for the WCF-Custom adapter. 2. In Solution Explorer, double-click gen-TableOperation.dbo.Loans.xsd. 3. In the Schema Editor, right-click <Schema> and then click Expand Schema Node. This schema defines the XML message format that can be used to insert rows in to the LOANS table of the AdvWorks database. Notice the elements listed under the LOANS element. The names and properties of these elements match those of the columns of the LOANS table. 4. Right-click the Messaging project, then click Deploy. 5. In BizTalk Server Administration Console, expand Platform Settings, and then click Host Instances. 6. If the BizTalkServerApplication host instance is already running, right-click on it, and then click Restart. Otherwise, right-click on it and then click Start. 7. Pause the bt10d-demos virtual machine. BizTalk Server 2010 Application Adapters Describe how the Windows SharePoint adapter is used to send and receive messages to and from a SharePoint site. Application Adapters Application adapters allow BizTalk Server to communicate with certain Microsoft applications or with third-party applications. BizTalk Server 2010 includes new adapters for the latest versions of the most popular enterprise applications, including Siebel, Oracle eBS, and JD Edwards. Additionally, you can write your own custom application adapter by using the BizTalk Adapter Framework. Integrating with Application Adapters Describe how the Windows SharePoint adapter is used to send and receive messages to and from a SharePoint site. Windows SharePoint Adapter The Windows SharePoint adapter enables the sending and receiving of documents through Windows SharePoint libraries. The receive adapter polls SharePoint document library views. It calls a Web method on the SharePoint server that uses the SharePoint object model to browse the library, check out the files, and return the file data to the adapter. The adapter then submits the files to the BizTalk Server MessageBox and calls another Web method to delete or archive the files from the SharePoint server. In order to filter files in a SharePoint library, the adapter polls the SharePoint Services library through a SharePoint view. On the send side, the SharePoint adapter publishes documents to a SharePoint document library by calling a Web method on the SharePoint server. The adapter specifies several properties including the SharePoint site, document library or document list, and the file or list item name. Demonstration: Integrating with SharePoint Learn how to configure the Windows SharePoint adapter to send to and receive messages from a SharePoint form library. Configure the SharePoint Receive Adapter by Using the BizTalk Server Administration Console 1. Resume the bt10d-demos virtual machine. 2. In the BizTalk Server Administration Console, right-click Receive Ports, point to New, and then click One-way Receive Port. 3. In the Receive Port Properties dialog box, in the Name box, type LoanApplication. 4. Click Receive Locations, and then click New. 5. In the Receive Location Properties dialog box, in the Name box, type LoanApplicationSharePoint. 6. In the Type list, click Windows SharePoint Services, in the Receive pipeline list, click XMLReceive, and then click Configure. 7. In the Windows SharePoint Services Transport Properties dialog box, in the General section, configure the properties as they appear in the following table: Property Setting SharePoint Site URL http://BIZTALKDEMO Source Document Library URL LoanApplications View Name Evaluated 8. Click OK three times. 9. In the BizTalk Server Administration Console, under the Demos application, click Receive Locations, right-click LoanApplicationSharePoint, and then click Enable. Configure the SharePoint Send Adapter by Using BizTalk Server Administration Console 1. In the BizTalk Server Administration Console, right-click Send Ports, point to New, and then click Static One-way Send Port. 2. In the Send Port Properties dialog box, in the Name box, type ProcessedLoansSharePoint. 3. In the Type list, click Windows SharePoint Services, and then click Configure. 4. In the Windows SharePoint Services Transport Properties dialog box, in the General section, configure the properties as they appear in the following table, and then click OK. Property Setting Destination Folder URL ProcessedLoans Filename Loan%MessageID%.xml SharePoint Site URL http://BIZTALKDEMO 5. In the Send Port Properties dialog box, click Filters. 6. In the Property list, click BTS.ReceivePortName, and then type LoanApplication in the Value box. 7. Click OK to close the Send Port Properties window. 8. Click Send Ports, then right-click ProcessedLoansSharePoint, and then click Start. Ensure that the BizTalk Services are started 1. In Windows Explorer, navigate to C:\AllFiles, and then double click startBtServices.cmd. 2. If you have not already extended the expiration date of the Microsoft Office 2010 version installed in this virtual machine, then double click extend.cmd, also in the C:\AllFiles folder. Test the Ports 1. In Microsoft Internet Explorer, browse to http://BIZTALKDEMO/LoanApplications 2. Click LoanApp-200000, and click Open in the File Download dialog box, to open the document in InfoPath. 3. Click Cancel in the Microsoft Office Activation Wizard window. 4. In the Loan Status list, click Approved, and then on the Home menu ribbon click Submit. 5. In the Microsoft InfoPath message box, click OK. 6. Close Microsoft InfoPath®. 7. In Internet Explorer, continue to refresh your browser until the message disappears. This may take up to a minute. 8. In Internet Explorer, navigate to http://BIZTALKDEMO/ProcessedLoans, and then notice the new message that is there. 9. Close all open windows, and shut down the virtual machine. Lab: Integrating with Adapters Time estimated: 45 minutes Scenario BizTalk Server uses adapters to communicate with external systems and processes. Adventure Works needs to integrate with several systems. Sales orders can now be sent from stores as HTTP messages in addition to the file receive process already in place. Loan applications that require approval are sent to a Microsoft Windows SharePoint Services form library for manual review. All completed sales orders will be sent to an FTP site. In this lab, you will configure the HTTP adapter, the FTP adapter, and the Windows SharePoint Services adapter. Start the Virtual Machine Procedure List 1. If the Server Manager window is not already open, click on the Server Manager icon located in the task bar next to the Start button. 2. Expand Roles, Hyper-V, Hyper-V Manager. The last node to appear displays the machine name. Click on it to see the list of virtual machines available. 3. Double-click the virtual machine bt10d-07 to open a Virtual Machine Connection window. 4. Click on the Action menu in the Virtual Machine Connection window and choose Start. 5. Once the virtual machine starts, press CTRL+ALT+END. 6. Log on using the user name Administrator and the password pass@word1. 7. At the Windows Activation prompt, click Ask Me Later, then click OK Ensure that the BizTalk Services are started Procedure List 1. In Windows Explorer, navigate to C:\AllFiles. 2. Double click on startBtServices.cmd. 3. When prompted, press any key to close the command-line window. Exercise 1: Publishing an InfoPath Form to a SharePoint Library Overview Microsoft InfoPath is a program used to create graphical templates (based on XML schemas) that display XML messages in a user-friendly form. InfoPath can also be used to create new XML messages based on the template. When combined with Windows SharePoint Services, the two can provide a portal-based solution for managing XML messages. BizTalk Server, through the use of the Windows SharePoint Services adapter, can exchange messages with SharePoint form libraries. In this exercise, you will publish an InfoPath form to a SharePoint form library. You will then examine a sales order message using the InfoPath form. You will configure the Microsoft Windows SharePoint Services adapter to monitor and update SharePoint form libraries in a later exercise. Publish the LoanApplicationForm InfoPath Form to a SharePoint Site Procedure List 1. In Windows Explorer, navigate to C:\AllFiles\LabFiles\Common, right-click LoanApplicationForm.xsn, and then click Design. In the Microsoft Office Activation Wizard window, click Cancel. This InfoPath form template is based on the LoanApplication schema. When completed, the resulting message will be a valid loan application. 2. In the Microsoft InfoPath window, on the File menu, click Publish, and then click the SharePoint Server icon. 3. In the Microsoft InfoPath window, click OK 4. In the Save As dialog box, navigate to C:\AllFiles\LabFiles\Common, click LoanApplicationForm.xsn, and then click Save. 5. In the Microsoft InfoPath window, click Overwrite. 6. In the Publish Wizard window, in the Enter the location of your SharePoint site box, type http://BIZTALKDEMO/, and then click Next. 7. Click Form Library, and then click Next. 8. Click Create a new form library, and then click Next. 9. In the Name box, type LoanApplications, and then click Next. 10. Next to the Column Name box, click Add. 11. In the Select a Field or Group dialog box, expand LoanConditions, and click LoanStatus. 12. In the Column name box, change the value to Status, and then click OK. The LoanStatus field of this form will now be displayed as the Status column in the form library. 13. Click Next, and then click Publish. 14. On the Publishing Wizard confirmation page, check the Open this form library check box, and then click Close. 15. Close InfoPath. The SharePoint form library you just created opens in Microsoft Internet Explorer. 16. On the LoanApplications page, click Add document. In the Microsoft Office Activation Wizard window, click Cancel. The form has been successfully published. 17. Close InfoPath and Internet Explorer. Examine a Sales Order That Was Created by Using the SalesOrderForm InfoPath Form Procedure List 1. In Windows Explorer, navigate to C:\AllFiles\LabFiles\Lab7, and then double-click CashSalesOrder1Info.xml. In the Microsoft Office Activation Wizard window, click Cancel. Notice that an InfoPath form has also been created for the Sales Orders. 2. Close CashSalesOrder1Info.xml. Exercise 2: Configuring and Testing the HTTP Receive Adapter Overview The BizTalk Server HTTP receive adapter accepts messages that are sent to Internet Information Services (IIS). The HTTP receive adapter accepts HTTP POST messages that are sent to a preconfigured IIS virtual directory, and it publishes the messages to the BizTalk MessageBox. In this exercise, you will configure and test a new receive location that uses the HTTP receive adapter to process incoming sales order messages. Create a Virtual Directory in IIS for the HTTP Receive Adapter Procedure List 1. On the Start menu, click All Programs, click Administrative Tools, and then click Internet Information Services (IIS) Manager. 2. In the left pane of the Internet Information Services (IIS) Manager window, expand BIZTALKDEMO, Sites and Default Web Site. 3. Right-click Default Web Site, then click Add Application. 4. In the Alias box, enter AdventureWorks. 5. Click the Select button and in the Select Application Pool dialog box, choose BTSHttpPool from the list, then click OK. The user ID assigned to the BTSHttpPool application pool has been granted the permissions required to publish messages to the MessageBox. 6. Click the ellipsis (…) next to the Physical path box. 7. In the Browse for Folder dialog box, browse to C:\Program Files (x86)\Microsoft BizTalk Server 2010\HttpReceive, and then click OK twice. 8. In the Internet Information Services (IIS) Manager window, in the center pane, in the IIS section, double-click the Handler Mappings icon. 9. In the right pane, click Add Script Map. 10. In the Add Script Map dialog box, in the Request path box, enter BTSHTTPReceive.dll. 11. Click the ellipsis (…) next to the Executable box, then browse to C:\Program Files (x86)\Microsoft BizTalk Server 2010\HttpReceive\BTSHTTPReceive.dll, and then click Open. 12. In the Name box type BizTalk HTTP Receive Adapter, and click OK. 13. In the new Add Script Map dialog box that appears, click Yes. 14. Close the Internet Information Services (IIS) Manager window. IIS will now execute the BizTalk HTTP receive adapter when HTTP POST messages are sent to http://biztalkdemo/AdventureWorks/BTSHTTPReceive.dll. Configure an HTTP Receive Location Procedure List 1. On the Start menu, click All Programs, click Microsoft BizTalk Server 2010, and then click BizTalk Server Administration. 2. In the BizTalk Server Administration Console, expand BizTalk Server Administration, BizTalk Group, Applications, AdventureWorks, and then click Receive Locations. 3. Right-click Receive Locations, point to New, and then click One-way Receive Location. 4. In the Select a Receive Port box, click SalesOrder, and then click OK. 5. In the Receive Location Properties dialog box, in the Name box, type SalesOrderHTTP. 6. In the Type list, click HTTP, and then click Configure. 7. In the HTTP Transport Properties dialog box, in the Virtual directory plus ISAPI extension box, type /AdventureWorks/BTSHTTPReceive.dll, and then click OK. 8. In the Receive Location Properties dialog box, in the Receive pipeline list, click XMLReceive, and then click OK. 9. In the BizTalk Server Administration Console, under Receive Locations, right-click SalesOrderHTTP, and then click Enable. Start the AllOrdersFILE Send Port Procedure List 1. In BizTalk Administration Console, under AdventureWorks, click Send Ports. 2. Right click the AllOrdersFILE send port, and then click Start. Test the HTTP Adapter Procedure List 1. In Windows Explorer, navigate to C:\AllFiles\LabFiles\Lab7, and then double-click CashSalesOrder1Info.xml. In the Microsoft Office Activation Wizard window, click Cancel. 2. On the InfoPath Home menu ribbon, click Submit. In the InfoPath Editor Security Notice window, click Yes. The InfoPath form for this document is configured to submit the XML message as an HTTP POST request to http://biztalkdemo/AdventureWorks/BTSHTTPReceive.dll 3. Click OK. 4. In Windows Explorer, navigate to C:\AllFiles\LabFiles\Lab7\AllOrders. 5. Open the XML document that appears in this folder. The Cash Sales Order was received and processed successfully. 6. Close InfoPath, and delete any files in C:\AllFiles\LabFiles\Lab7\AllOrders. Exercise 3: Configuring and Testing the FTP Adapter Overview The FTP adapter allows BizTalk Server to interact with local or remote FTP sites. In this exercise, you will configure a send port to send all completed cash sales orders to an FTP site. Reconfigure the CashOrdersFILE Send Port to Use the FTP Adapter Procedure List 1. In the BizTalk Server Administration Console, under AdventureWorks, click Send Ports, and then double-click CashOrdersFILE. 2. In the Send Port Properties dialog box, in the Name box, type CashOrdersFTP. 3. In the Type list, click FTP, and then click Configure. 4. In the FTP Transport Properties dialog box, under FTP, in the Folder box, type CashOrders. 5. In the Password box, click the drop-down arrow, and then type pass@word1. 6. In the Server box, type BIZTALKDEMO. 7. In the Target File Name box, replace the existing text with Cash%MessageID%.xml. 8. In the User Name box, type Administrator, and then click OK. 9. In the Send Port Properties dialog box, in the left pane, click Filters. Notice that this is the filter expression configured in the module 5 lab. 10. In the Send Port Properties dialog box, click OK. 11. Right click the CashOrdersFTP send port and click Start. Test the CashOrdersFTP Send Port Procedure List 1. In Windows Explorer, navigate to C:\AllFiles\LabFiles\Lab7, and then double-click CashSalesOrder1Info.xml. In the Microsoft Office Activation Wizard window, click Cancel. 2. On the InfoPath Home menu ribbon, click Submit, and then click OK. 3. In Windows Explorer, navigate to C:\AllFiles\LabFiles\Lab7\CashOrders. Notice that the message you just sent does not appear in the CashOrders folder. 4. In Internet Explorer, go to ftp://BIZTALKDEMO/CashOrders. 5. In the Internet Explorer dialog box, in the User name box, enter Administrator. In the Password box, enter pass@word1. 6. Open the document that appears in the FTP folder. Notice the blue text at the top of the message. This text is known as InfoPath processing instructions. This path specifies where the InfoPath form template that can be used to display this message is found. Because this message is being opened from an FTP site that does not have access to the path specified, the message is opened as a regular XML document. These instructions do not affect BizTalk Server processing. 7. Close Internet Explorer. Exercise 4: Configuring and Testing the SharePoint Adapter Overview The SharePoint adapter enables integration between BizTalk Server and Windows SharePoint form libraries. You can configure the SharePoint adapter receive location to use a filtered view to determine which messages should be processed. The SharePoint form library in this lab is used to manually evaluate loan applications. In this exercise, you will create a SharePoint view, configure a send port and a receive location to use the Windows SharePoint Services adapter, and then test the configuration. Configure and Test a SharePoint Send Port Procedure List 1. In the BizTalk Server Administration Console, click Send Ports, and then double-click CreditOrdersFILE. 2. In the Send Port Properties dialog box, in the Name box, type CreditOrdersSharePoint. 3. In the Type list, click Windows SharePoint Services, and then click Configure. 4. In the Windows SharePoint Services Transport Properties dialog box, under General, configure the properties as they appear in the following table, and then click OK. Property Setting Destination Folder URL LoanApplications Filename CreditOrder%MessageID%.xml SharePoint Site URL http://BIZTALKDEMO This is the form library that you created in the first exercise of this lab. All credit orders received will be sent to this form library for manual approval of the loan. 5. In the Send pipeline list, click XMLTransmit, and then click the ellipsis (…) button. 6. In the Configure Pipeline dialog box, in the ProcessingInstructionsOptions box, type 1. Setting the ProcessingInstructionsOptions to ”1” will remove all existing InfoPath processing instructions and then insert the processing instructions you specify in the XmlAsmProcessingInstructions box. 7. In Windows Explorer, navigate to and open C:\AllFiles\LabFiles\Lab7\ProcessingInstructions.txt. 8. Copy all of the text that appears in ProcessingInstructions.txt, and then close Notepad. These are the processing instructions for the form that you published in the first exercise. 9. In the Configure Pipeline dialog box, in the XmlAsmProcessingInstructions box, paste the text you just copied, and then click OK. This message will no longer open using the processing instructions for the SalesOrder form. When opened, it will use the InfoPath form that you published to the SharePoint library. 10. Click OK to close the Send Port Properties dialog box. 11. Right click the CreditOrdersSharePoint send port, and click Start. Test the CreditOrdersSharePoint Send Port Procedure List 1. In Windows Explorer, navigate to C:\AllFiles\LabFiles\Lab7, and then double-click CreditSalesOrder1Info.xml. 2. On the InfoPath Home menu ribbon, click Submit, and then click OK. 3. In Internet Explorer, browse to http://BIZTALKDEMO/LoanApplications. 4. Click the CreditOrder{GUID} message, and then in the File Download dialog box, click Open. Notice that this message is displayed in the LoanApplication format. 5. Close the InfoPath window. Create a New SharePoint Form Library View Procedure List 1. In Internet Explorer, browse to http://BIZTALKDEMO/LoanApplications. 2. In the Browse tab of the main menu, click All Documents, and then click Create View. 3. In the Choose a view format section, click Standard View. 4. In the View Name box, type Evaluated. 5. Scroll down to the Columns section. Notice the Status column name. This is the field from the message for which you created a column in Exercise 1. You are going to create a view using that column. 6. Scroll down to the Filter section, and then click Show items only when the following is true. 7. Configure the Filter section as seen in the following screen shot. 8. Click OK at the bottom of the page. 9. In the Browse tab, notice that the currently selected view Evaluated. Notice that the message is not displayed in this view. 10. Click Evaluated, and then click All Documents. 11. Click CreditOrder{GUID}, and then in the File Download dialog box, click Open. 12. In the CreditOrder{GUID}.xml window, in the Loan Status list, click Approved. 13. Close CreditOrder{GUID}.xml, and then click Yes to save your changes. 14. In the Browse tab, click All Documents, then click Evaluated. Notice that the message appears in the Evaluated view and that the Status column shows the loan is Approved. 15. Click CreditOrder{GUID}, and then in the File Download dialog box, click Open. 16. In the CreditOrder{GUID}.xml window, in the Loan Status list, click Denied. 17. Close CreditOrder{GUID}.xml, and then click Yes to save your changes. 18. On the LoanApplications page, click the refresh button. Notice that the message remains in the Evaluated view and that the LoanStatus column shows the loan is Denied. 19. Click CreditOrder{GUID}, and then in the File Download dialog box, click Open. 20. In the CreditOrder{GUID}.xml window, in the Loan Status list, click Select. 21. Close CreditOrder{GUID}.xml, and then click Yes to save your changes. 22. On the LoanApplications page, click the refresh button. Notice that the message no longer appears on the Evaluated page. 23. In the Browse tab, click Evaluated, then click All Documents. Configure and Test a SharePoint Receive Location Procedure List 1. In the BizTalk Server Administration Console, right-click Receive Ports, point to New, and then click One-way Receive Port. 2. In the Receive Port Properties dialog box, in the Name box, type LoanApplications. 3. Click Receive Locations, and then click New. 4. In the Receive Location Properties dialog box, in the Name box, type LoanApplicationsSharePoint. 5. In the Type list, click Windows SharePoint Service. In the Receive pipeline list, click XMLReceive, and then click Configure. 6. In the Windows SharePoint Services Transport Properties dialog box, under General, configure the properties as they appear in the following table, and then click OK. Property Setting Polling Interval 15 SharePoint Site URL http://BIZTALKDEMO Source Document Library URL LoanApplications View Name Evaluated The SharePoint adapter will process all messages displayed by the view specified. This receive location will process messages displayed by the Evaluated view. 7. Click OK three times. 8. In the BizTalk Server Administration Console, click Send Ports, right-click CashOrdersFTP, and then click Properties. 9. In the Send Port Properties dialog box, click Filters. 10. On the second line of the existing filter expressions, in the Group by list, click Or. 11. Add two filter expressions and configure according to the information in the following table, and then click OK. Property Operator Value Group by BTS.ReceivePortName == LoanApplications And Messaging.PropertySchema.LoanStatus == Approved And 12. In the BizTalk Server Administration Console, click Receive Locations, right-click LoanApplicationsSharePoint, and then click Enable. 13. In Internet Explorer, browse to http://BIZTALKDEMO/LoanApplications. 14. Click CreditOrder{GUID}, and then, in the File Download dialog box, click Open. 15. In the CreditOrder{GUID}.xml window, in the Loan Status list, click Approved. 16. Close CreditOrder{GUID}.xml, and then click Yes to save your changes. 17. In Internet Explorer, browse to ftp://localhost/CashOrders. It may take up to a minute for the message to be processed. 18. Click the new Cash{GUID}. 19. Examine and then close the message