The following sections describe how the connector processes business objects, how meta-objects are used for configuration, and how the connector handles event notification.
The connector uses request/response operations to pass data between it and a URL. The connector receives business object requests from an integration broker and converts the requests into XML streams. The request stream is passed to a URL by using the POST method, and a response stream is returned that may or may not have similar content. The response stream is converted into a response business object and returned with the original top-level business object to the integration broker. Note that the type of business object request can differ from that of the business object response.
The complete request-response cycle is illustrated in Figure 2.
When the connector receives a business object request from an integration broker, it must convert it into a request stream that can be passed by using the appropriate protocol. The protocol handler and the XML data handler are used to convert and send a request business object to a URL. Figure 3 illustrates the request process.
Specifically, when the connector receives a top-level business object from the integration broker, the following process flow occurs:
If you are using a synchronous protocol handler, then when the response business object is returned from a URL, it is returned in the form of a response stream. If you are using an asynchronous protocol handler, then return code is simply passed back. The response processing is similar to the request processing, except the response stream must be translated back into a business object.
Figure 4 illustrates the process flow of the response business object returning to the connector.
Specifically, when the protocol handler receives a response stream from a URL, the following process flow occurs if the MIME type is text/xml:
Note that the data format in the response stream can be different from the data format in the original request business object.
For event notification, the connector uses business objects to retrieve events from a URL. The connector polls a URL by sending a request XML document that is returned as a response XML document. The response contains child business objects that the connector passes to the integration broker as events. Each child business object is processed as a single event. The asynchronous protocol handler does not support event notification.
An event notification business object follows the same business object processing operations as the request and response business objects of an XML business object. All unsubscribed events are archived to a file in the WebSphere Business Integration Adapters standard business object dump format.
To enable event notification, you need to define event notification business objects and set up your URL (such as a Web servlet or cgi-bin script) to handle these business objects. The connector uses the POST method to send an XML event request document as a stream to the URL. The URL should read the XML document as a stream from STDIN and write an XML document which contains one or more event objects as a stream to STDOUT.
Figure 5 illustrates the basic process of event notification.
For more information on defining business objects, see Developing business objects for the connector