Module 7:Integrating with Adapters

Time estimated: 120minutes

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 adaptersby 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 MessageBoxdatabase 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, OracleeBS, 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 couldbe 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 amongBizTalk 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 non-transactional, 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 MQmessaging 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 MQadapter 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 FTPadapter.

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 FTPAdapter 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 ReceivePort.
  3. In the Receive Port Properties dialog box, in the Namebox, typeShipments, 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 Namebox, typeShipmentsFTP, in the Type list, click FTP, and then click Configure.

Here you are creating a receive location that will use the FTPadapter to pick up messages for processing by the orchestration.

  1. In the FTP Transport Propertiesdialog box, under theFTP section,in the Folder box, type ShippedOrders.
  2. In the File Mask box, type *.xml.
  3. In the Password box, type pass@word1.
  4. In the Server box, type BIZTALKDEMO.
  5. In the User Name box, type Administrator, and then click OK.
  6. In the Receive Location Propertiesdialog box, in the Receive pipelinelist, click XMLReceive, and then click OK.
  7. In the Receive Port Properties dialog box, click OK.
  8. Pause the bt10d-demos virtual machine.

Integrating with WCF Adapters

Describe how the BizTalk WCFadaptersareused 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 cross-process 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-CustomAdapter

The WCF-Customadapter replaces the SQL adapter that was included in previous versions of BizTalk. With the WCF-Custom adapter, BizTalk Server canexchange messages to and from a Microsoft SQL Server™2008 and Oracle 11g databases. You can use the WCF-Customadapter 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-Customadapter 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.