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, FTP/S Scripting, and HTTP/S transports. All these receivers support the user exit framework, which allows modification of the transports. WebSphere Partner Gateway includes an API so you can develop your own receivers, based on your 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 Community Console to configure targets and associate them with receivers, see the Hub Configuration Guide.

In addition to developing completely new receivers, you 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, you can use the Community 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 the main processing takes place. For example, in some situations multiple records can be sent in one wrapper message. Preprocessing can separate the individual messages 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; however, 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.

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