Adapter architecture

The SAP XI adapter allows IBM WebSphere Business Integration Collaborations to asynchronously exchange Business Objects with SAP XI. The adapter uses an MQ implementation of the Java(TM) Message Service (JMS), an API for accessing enterprise-messaging systems that also makes possible guaranteed event delivery.

The message exchange between SAP XI integration servers and SAP XI adapters is carried out using the WebSphere MQ queues. On the SAP XI side, JMS Inbound and JMS Outbound adapters are configured for WebSphere MQ interaction.

Figure 1. Architecture diagram

The adapter for SAP Exchange Infrastructure is metadata-driven. Message routing and format conversion are initiated by an event polling technique. During event processing, the adapter retrieves SAP XI messages from queues, calls data handlers to convert those messages to their corresponding business objects, and then delivers the business objects to the Integration Broker. In the opposite direction, during request processing, the adapter receives business objects from the Integration Broker, converts them into SAP XI messages using the same data handler, and then delivers the messages to an SAP XI Integration Server.

The SAP XI adapter uses the XML data handler to process SAP XI messages. For information about how to configure this data handler to work with the SAP Exchange Infrastructure connector, see Chapter 3, "XML data handler," in the Data Handler Guide.

XML and business objects

The type of business object and verb used in processing a message is based on the XML root element name contained in the message body. The connector uses metaobject entries to determine business object name and verb. For each message, you construct a metaobject to store the business object name and verb to associate with the SAP Exchange Infrastructure message root element.

You can construct a dynamic metaobject that is added as a child to the business object passed to the connector. The child metaobject values override those specified in the static metaobject that is specified for the connector as a whole. If the child metaobject is not defined or does not define a required conversion property, the connector, by default, examines the static metaobject for the value. You can specify one or more dynamic child metaobjects instead of, or to supplement, a single static connector metaobject.

The connector can poll multiple input queues, polling each in a round-robin manner and retrieving a specified number of messages from each queue. For each message retrieved during polling, the connector adds a dynamic child metaobject (if specified in the business object). The child metaobject values can direct the connector to populate attributes of the business object with the format of the message as well as with the name of the input queue from which the message was retrieved.

When a message is retrieved from the input queue, the connector looks up the business object name, using the XML root element name. The message body, along with a new instance of the appropriate business object, is then passed to the data handler. If a business object name is not found associated with the format, the message body alone is passed to the data handler. If a business object is successfully populated with message content, the connector checks to see if it is subscribed, and then delivers it to the Integration Broker using the gotApplEvents() method.

Copyright IBM Corp. 1997, 2003