Receiving a document

Documents enter the hub processing system through components known as receivers. Receivers are responsible for monitoring transports for inbound documents, retrieving the documents that arrive, performing some basic processing on them, and then placing them in a storage queue from which the main processing engine can retrieve them.

Receivers are transport-specific. WebSphere Partner Gateway ships with receivers designed to handle FTP/S, JMS, File, SMTP, and HTTP/S transports. Version 6.0 also includes an API so that users can develop their own receivers, based on their specific needs.

Receivers are associated with transport configurations called targets. A target designates the entry point for documents coming into WebSphere Partner Gateway. Targets are configured through the Community Console. A user-developed receiver can have one or more targets in the same manner as a provided receiver does. For more information on using the console to configure targets and associate them with receivers, see the Hub Configuration Guide.

In addition to developing completely new receivers, WebSphere Partner Gateway 6.0 users can develop user exit plug-in modules to customize how receivers process incoming documents. These modules are called handlers. There are three places in the receiver processing sequence where user exit handlers can be called to do additional processing: preprocessing, sync checking (determining whether a document is to be processed synchronously or asynchronously) , and postprocessing. At each of these places, also called configuration points, the user can use the console to specify one or more handlers.

Preprocessing handlers are used to perform any necessary preprocessing of documents before they are sent to the Document Manager, where main processing takes place. For example, in some situations multiple records may be sent in one wrapper message. Preprocessing could separate the individual messages from each other before they are sent on for actual processing.

Documents can be processed either synchronously or asynchronously by WebSphere Partner Gateway. In synchronous processing, the sending partner expects business-protocol-level response (in addition to transport-level response) in the same connection as the one in which it sent the request. In asynchronous processing, the sending partner expects transport-level response. You can use a specialized handler to check whether a partner is expecting a synchronous response. WebSphere Partner Gateway ships with two default sync-check handlers, DefaultSynchronousSyncCheckHandler and DefaultAsynchrounousSyncCheckHandler, but you can supply your own. This is particularly useful in the case of some document types in which defining dedicated synchronous and asynchronous targets, using default handlers, can increase throughput.

Preprocessing handlers are used to customize the incoming request business document before WebSphere Partner Gateway processes it. For example, they may split one document into multiple documents. Postprocessing handlers are used to deal with the response documents that WebSphere Partner Gateway returns to initiating partners when WebSphere Partner Gateway is synchronously processing a request document.

Copyright IBM Corp. 2003, 2005