WebSphere Message Brokers
File: ac30020_
Writer: Catherine Tucker

Reference topic

This build: July 31, 2007 21:19:54

Creating a Web service with HTTP as the transport

This scenario implements a Web service using HTTP as the transport mechanism and MIME as the domain. A message flow for this scenario, and the resulting message tree are given below:

This diagram shows an external HTTP client sending and receiving messages from a message flow. The message flow consists of an HTTPInput node connected to a Compute node. The Compute node is then connected to an HTTPReply node. The reply message is sent back to the HTTP client.

The diagram shows a logical message tree. The root of the tree is called Root, and it has four children. These are, in order, Properties, HTTPInputHeader, HTTPReplyHeader, and MIME.

When a MIME message enters the message flow the top-level Content-Type of the message is stored in the HTTPInputHeader tree and in the MIME tree. The broker also stores a copy of the Content-Type of the message as the ContentType value in the Properties subtree.

Any processing that this message flow needs to do is done in the Compute node. The output domain of this message flow is also MIME, therefore the output message must be a MIME tree. This tree can be made by either creating a new tree, or modifying the incoming MIME message tree using the Compute node. If the Content-Type of a message needs to be modified, update the broker ContentType property. When this property is changed, the MIME tree is updated automatically.

For the message to be output as an HTTP reply, there must be a HTTP reply header. You can create this in two ways:
  • Set the HTTPReply node to automatically generate the header:
    1. Right-click the HTTPReply node and click Properties.
    2. Click the Generate default HTTP headers from input or response option in the Basic properties.
  • Set up an HTTPReplyHeader in the output tree, as illustrated in the following ESQL:
     SET OutputRoot.HTTPReplyHeader.Host = 'localhost:1234'; 
Related concepts
MIME tree details
MIME messages
Manipulating messages in the MIME domain
Related tasks
Developing ESQL
Developing Java
Related reference
Creating a Web service with WebSphere MQ as the transport
Accessing a WebSphere MQ enabled application as a Web service
A WebSphere MQ enabled application calling a Web service
HTTPReply node
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:19:54

ac30020_ This topic's URL is: