Using HTTP transport protocol with Message Broker

This section describes how to send and receive documents between WebSphere Partner Gateway and WebSphere Business Integration Message Broker through the use of the HTTP transport protocol.

Note: All references to the HTTP transport protocol apply to HTTPS as well.

Components required for documents over HTTP transport

You need no additional software to send or receive a document between WebSphere Partner Gateway and Message Broker using the HTTP transport protocol. Only WebSphere Partner Gateway and Message Broker are required. For WebSphere Partner Gateway to communicate with version 5.0 of Message Broker using the HTTP transport protocol, these two components must be configured. Table 65 summarizes these configuration steps.

Table 65. Configuring WebSphere Partner Gateway and Message Broker
Component Version For more information
WebSphere Partner Gateway 6.0

Configuration for sending documents over the HTTP transport protocol

Configuring for incoming documents over HTTP transport protocol

WebSphere Business Integration Message Broker 5.0 Configuring Message Broker

In addition, to send or receive a document between WebSphere Partner Gateway and Message Broker using the HTTP transport protocol, you must use the version 5.3 IBM WebSphere MQ as your JMS provider.

Sending documents over HTTP transport

For WebSphere Partner Gateway to send a document to Message Broker over the HTTP transport protocol, you use special HTTP-transport nodes within the Message Broker message flow to retrieve the document that WebSphere Partner Gateway has sent as an HTTP stream. The nodes of the message flow perform the computations required and then route the document to some destination (a JMS output queue).

The following steps describe how WebSphere Partner Gateway sends a document to a message flow within Message Broker over the HTTP transport protocol:

  1. WebSphere Partner Gateway sends an HTTP message to Message Broker.

    If the packaging type of the document was Backend Integration, WebSphere Partner Gateway has provided custom properties in this message.

    Note: Within WebSphere Partner Gateway, you must configure a gateway that identifies the URL to which WebSphere Partner Gateway sends the message and on which Message Broker is polling. For more information, see Configuration for sending documents over the HTTP transport protocol.
  2. The HTTPInput node of the message flow picks up the document and sends it to the next node of the message flow. This node is usually a compute node.
  3. The nodes of the message flow perform the business logic.

    When business logic is complete, the message flow sends the resulting document to its HTTPReply node.

  4. The HTTPReply node, by default, sends back the output message to the client (WebSphere Partner Gateway).

    Alternatively, the message flow can put the message into an MQOutput node. The MQOutput node receives the document and sends it to the appropriate JMS queue or other application.

Receiving documents over HTTP transport

For WebSphere Partner Gateway to receive a document from Message Broker using the HTTP transport protocol, you use special HTTP-transport nodes within the Message Broker message flow to send the document that WebSphere Partner Gateway is to receive as an HTTP stream. The nodes of the message flow perform the computations required and handle the request and response (if the interaction is synchronous) with WebSphere Partner Gateway.

The following steps describe how WebSphere Partner Gateway receives a document from a message flow within Message Broker over the HTTP transport protocol:

  1. The message flow within Message Broker receives a document in its MQInput node (a JMS input queue).
  2. The MQInput node of the message flow receives the document and sends it to the HTTPRequest node.
  3. The HTTPRequest node handles the request and response interactions with the client (WebSphere Partner Gateway), using a specified URL.
  4. WebSphere Partner Gateway receives the message from its URL, as configured in its target.

    For more information on the target, see Configuring for incoming documents over HTTP transport protocol.

Creating the message flow for HTTP transport

For a Message Broker message flow to handle documents over the HTTP transport protocol, it uses the following transport nodes:

The order of use for these transport nodes depends on the direction of communication, as follows:

Table 66. Nodes for sending documents to Message Broker over HTTP
Node type Purpose Notes
HTTPInput Receives the WebSphere Partner Gateway request document into the message flow

Set this transport node URL Selector field (in the Basic properties) to the URL where WebSphere Partner Gateway sends its documents (the URL configured in the WebSphere Partner Gateway target).The URL should have the following format:

http://hostName:port/path

where hostName is the name of the computer on which Message Broker resides, port is the HTTP port number on which the Message Broker is listening, and path identifies the location on this computer.

For more information, see Configuration for sending documents over the HTTP transport protocol.

Compute Performs business-logic tasks, such as updating header information Use ESQL to perform the business logic. The compute node sends the resulting message to the HTTPReply node.
HTTPReply Returns a response to WebSphere Partner Gateway By default, this node sends the output message to the client. However, you can configure it to send it to an MQOutput node.
MQOutput Receives the document from the HTTPReply node and sends it to WebSphere Partner Gateway This transport node sends the resulting document to a JMS output queue, which routes it to its next destination.
Table 67. Nodes for receiving documents from Message Broker over HTTP
Node type Purpose Notes
MQInput Receives the document from WebSphere Partner Gateway This transport node receives the incoming document from a JMS input queue.
HTTPRequest Handles request/response interactions with WebSphere Partner Gateway

This transport node must set its Web Services URL field (in the Basic Properties) to the URL where WebSphere Partner Gateway is listening for documents (the URL configured in the WebSphere Partner Gateway target). The URL should have the following format:

http://hostName:port/bcgreceiver/path

where hostName is the name of the computer on which WebSphere Partner Gateway resides, port is the HTTP port number on which the WebSphere Partner Gateway Receiver is listening, and path identifies the location on this computer.

For more information, see Configuring for incoming documents over HTTP transport protocol.

For more detailed information on how to create and configure message flow nodes, see your WebSphere Business Integration Message Broker documentation.

Copyright IBM Corp. 2003, 2005