HTTPReply node

This topic contains the following sections:

Purpose

Use the HTTPReply node to return a response from the message flow to the Web service client. This node generates the response to the Web service client from which the input message was received by the HTTPInput node, and waits for confirmation that it has been sent.

If you include an HTTPReply node in a message flow, you must either include an HTTPInput node in the same flow, or the message must be received from another flow that started with an HTTPInput node. The response is associated with the reply by a request identifier that is stored in LocalEnvironment by the HTTPInput node.

This node constructs a reply message for the Web service client from the entire input message tree, and returns it to the requestor.

The HTTPReply node is represented in the workbench by the following icon:

HTTPReply node icon

Using this node in a message flow

Refer to the HTTPInput node for examples of how you can use this node.

Configuring the HTTPReply node

When you have put an instance of the HTTPReply node into a message flow, you can configure it. Right-click the node in the editor view and click Properties. The node's basic properties are displayed.

All mandatory properties for which you must enter a value (those that do not have a default value defined) are marked with an asterisk on the properties dialog.

Configure the HTTPReply node as follows:

  1. Select the Ignore Transport Failures check box if you want transport-related failures to be ignored (for example, if the client is disconnected). If you clear the check box, and a transport-related error occurs, the input message is propagated to the failure terminal. If you clear the check box, you must supply a value for Reply send timeout.
  2. Set the Reply send timeout value if you are not ignoring transport failures. This is the length of time that the node waits for an acknowledgement that the client has received the reply. If the acknowledgement is received within this time, the input message is propagated through the out terminal to the rest of the message flow, if it is connected. If an acknowledgement is not received within this time, the input message is propagated through the failure terminal, if it is connected. If the failure terminal is not connected, and an acknowledgement is not received in time, an exception is generated.
  3. Select the Generate default HTTP headers from input or response check box if you want the Web service headers created within HTTPReplyHeader in the message tree to be populated with values from the HTTPResponseHeader within the input message. If you clear the check box, the Web service headers are populated with values from the HTTPInputHeader within the input message. If the appropriate header is not present in the input message, default values are used.

    The node always includes a Content-Length header, set to the correct calculated value, in the HTTPReplyHeader, even if this was not included in the original request.

  4. Select Description in the properties dialog navigator to enter a short description, a long description, or both.
  5. Click Apply to make the changes to the HTTPReply node without closing the properties dialog. Click OK to apply the changes and close the properties dialog.

    Click Cancel to close the dialog and discard all the changes that you have made to the properties.

Connecting the output terminals to another node

Connect the out or failure terminal of this node to another node in this message flow if you want to process the message further, process errors, or send the message to an additional destination.

Terminals and properties

The HTTPReply node terminals are described in the following table.

Terminal Description
In The input terminal that accepts a message for processing by the node.
Failure The output terminal to which the message is routed if a failure is detected when the message is propagated.
Out The output terminal to which the message is routed if it has been successfully propagated, and if further processing is required within this message flow.

The following tables describe the node properties; the column headed M indicates whether the property is mandatory (marked with an asterisk on the properties dialog if you must enter a value when no default is defined), the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the bar file to deploy it).

The HTTPReply node Basic properties are described in the following table.

Property M C Default Description
Ignore Transport Failures Yes No Selected Whether transport-related failures are ignored. If you select the check box, this action is performed.
Reply send timeout Yes No 120 The time in seconds that the reply node waits before assuming the reply has failed to reach the client. The valid range is zero (which means an indefinite wait) to (231)-1. Valid only if Ignore Transport Failures is cleared.
Generate default HTTP headers from input or response Yes No Selected Whether the Web service headers created under HTTPReplyHeader within the message tree are created using values from the HTTPResponseHeader (select the check box) or the HTTPInputHeader (clear the check box).

The HTTPReply node Description properties are described in the following table.

Property M C Default Description
Short Description No No   A brief description of the node.
Long Description No No   Text that describes the purpose of the node in the message flow.

Related concepts
WebSphere MQ Web Services Transport
Message flows

Related tasks
Deciding which nodes to use
Handling errors in message flows

Related reference
HTTPInput node
HTTPRequest node