Поделиться через


BizTalk Adapter Architecture

Commerce Server 2009 includes four BizTalk adapters that are designed to make it easier to use BizTalk Server to get data into and out of Commerce Server 2009. These four adapters, also known informally as the Commerce Server 2009 adapters, are designed to work with the Orders, Catalog, Inventory, and Profiles Systems, respectively. Each adapter has two different modes in which it can operate, known as receiving and sending, that reflects a BizTalk Server orientation. In the receive mode, an adapter is referred to as a receive adapter, and in the send mode, an adapter is referred to as a send adapter. The Commerce Server 2009 receive adapters all work similarly and all the Commerce Server 2009 send adapters work similarly.

The Commerce Server 2009 receive adapters are driven based on a schedule that you configure. At the scheduled times, the Commerce Server 2009 receive adapters use the corresponding Commerce Server 2009 Web service to produce a one-way export message that contains data from the corresponding system. Depending upon the type of Commerce Server 2009 receive adapter, the data received from Commerce Server 2009 can be filtered, and so on, in a variety of ways. The data export messages produced by the receive adapters are put in the BizTalk Server MessageBox Database, and are ultimately intended for consumption by some application beyond BizTalk Server, potentially with some amount of BizTalk Server processing occurring while the message is being delivered.

The Commerce Server 2009 send adapters are designed to be driven from the other direction, by solicit messages being received from one or more applications on the other side of BizTalk Server. These messages are eventually routed to a Commerce Server 2009 send adapter that has been configured to process them, again after BizTalk Server having had a chance to process the messages along the way, as may be required by such factors as different message formats and so on. The send adapters then use the corresponding Commerce Server 2009 Web service to initiate an operation with Commerce Server 2009 and then produce a corresponding response message to communicate the result of the operation back to the MessageBox Database, and ultimately to the configured consumer of the response message.

The following figure shows the Commerce Server 2009 and BizTalk Server 2006 architecture within which the Commerce Server 2009 adapters reside. These adapters are labeled with bold text in the upper part of the BizTalk Server box. The numbers along the left side of the figure correspond to the more detailed explanation that follows.

BizTalk Adapter Architecture

  1. The BizTalk adapters communicate with Commerce Server 2009 using the Commerce Server 2009 Web service APIs that are new to this version of Commerce Server 2009. The Orders and Profiles Systems each expose their own Web services and the Catalog and Inventory Systems share a single Web service.

  2. The receive adapters and send adapters that correspond to the Orders, Catalog, Inventory, and Profiles Systems use the corresponding Web service APIs to exchange data with the associated system. Some data is passed as API parameters and some data, very large data, is exchanged in the form of XML documents associated with the Web service calls and responses.

  3. Commerce Server 2009 receive adapters reside within BizTalk Server receive locations. Commerce Server 2009 send adapters reside within BizTalk Server Send ports. Together with receive and send pipelines they are responsible for interacting with the various systems that use the corresponding Web services supplied by those systems on one side, and on the other side with a set of predefined XML messages (adapter messages) that participate in typical BizTalk Server message processing and everything else that potentially involves (orchestration processing, data transformation, and so on).

  4. Between the Commerce Server 2009 adapters and the BizTalk Server MessageBox Database, a standard set of XML messages are exchanged. These messages are shown in the following table.

    Adapter Type

    Valid Adapter Messages

    Orders receive adapter

    CommerceServerOrdersExport

    Orders send adapter

    CommerceServerOrdersQuery, CommerceServerOrdersQueryResponse, CommerceServerOrdersAcceptBasket, CommerceServerOrdersAcceptBasketResponse, CommerceServerOrdersSavePurchaseOrder, CommerceServerOrdersSavePurchaseOrderResponse, CommerceServerOrdersUpdateOrderProperties, CommerceServerOrdersUpdateOrderPropertiesResponse

    Catalog receive adapter

    CommerceServerCatalogExport

    Catalog send adapter

    CommerceServerCatalogQuery, CommerceServerCatalogQueryResponse, CommerceServerCatalogImport, CommerceServerCatalogImportResponse

    Inventory receive adapter

    CommerceServerInventoryExport

    Inventory send adapter

    CommerceServerInventoryQuery, CommerceServerInventoryQueryResponse, CommerceServerInventoryImport, CommerceServerInventoryImportResponse

    Profiles receive adapter

    CommerceServerProfilesExport

    Profiles send adapter

    CommerceServerProfilesQuery, CommerceServerProfilesQueryResponse, CommerceServerProfilesImport, CommerceServerProfilesImportResponse, CommerceServerProfilesUpdate, CommerceServerProfilesUpdateResponse, CommerceServerProfilesDelete, CommerceServerProfilesDeleteResponse

  5. Standard BizTalk Server message processing can be used on the Commerce Server 2009 adapter messages that are put into the MessageBox Database. This includes orchestration processing, data transformations, and so on. Some adapter messages can be very large, such as those that contain large product catalogs. In order to preserve acceptable performance, you must exercise good judgment when you are determining how to process such large messages. For example, you may want to schedule the processing of large messages during particular time windows, when surplus processing power is more likely to be available.

  6. The ultimate purpose of using a Commerce Server 2009 adapter is to exchange data with an application "on the other side" of BizTalk Server. This could be another instance of Commerce Server 2009, one of your own line-of-business applications with which it makes sense to automate the exchange of business data, or perhaps one or more applications being run by your trading partners. The formats in which these other applications expect to send and receive data is important to your overall "connected commerce" solution, and BizTalk Server is your solution for making sure that the XML messages produced and consumed by the Commerce Server 2009 adapters can be transformed back and forth, as required, into these other formats.

See Also

Other Resources

Business Scenarios for Using the BizTalk Adapters

Developing with the BizTalk Adapters