WebSphere Message Brokers
File: ac04565_
Writer: Terry Cowling

Reference topic

This build: July 31, 2007 21:17:21

HTTPInput node

This topic contains the following sections:

Purpose

Use the HTTPInput node to receive Web service requests for processing by a message flow. Using the HTTPInput node with the HTTPReply and HTTPRequest nodes, the broker can act as an intermediary for Web services, and Web service requests can be transformed and routed in the same way as other message formats that are supported by WebSphere Message Broker. Web service requests can be received either in standard HTTP (1.0 or 1.1) format, or in HTTP over SSL (HTTPS) format. You can set the Use HTTPS property to choose whether to handle HTTP or HTTPS requests.

If you include an HTTPInput node in a message flow, you must either include an HTTPReply node in the same flow, or pass the message to another flow that includes an HTTPReply node (for example, through an MQOutput node to a second flow that starts with an MQInput node). In the latter case, the request from, and reply to, the client are coordinated by the request identifier stored in the LocalEnvironment (described below).

The HTTPInput node handles messages in the following message domains:

  • MRM
  • XML
  • XMLNS
  • XMLNSC
  • JMS
  • JMSStream
  • IDOC
  • MIME
  • BLOB

When the HTTPInput node receives a message from a Web service client, it invokes the appropriate parsers to interpret the headers and the body of the message, and to create the message tree that is used internally by the message flow. The node creates a unique identifier for the input message and stores it as a binary array of 24 bytes in the LocalEnvironment tree at LocalEnvironment.Destination.HTTP.RequestIdentifer. This value is used by the HTTPReply node and must not be modified in any way.

HTTP messages are always non-persistent, and have no associated order.

HTTP messages are non-transactional. However, if the message flow interacts with a database or another external resource, such as a WebSphere MQ queue, these interactions are performed transactionally. The HTTPInput node provides commit or rollback, depending on how the message flow has ended, and how it is configured for error handling (how failure terminals are connected, for example). If the message flow is rolled back by this node, a fault message is generated and returned to the client. The format of the fault is defined by the Fault Format property

If an exception occurs downstream in this message flow, and is not caught but is returned to this node, the node constructs an error reply to the client. This error is derived from the exception and the format of the error is defined by the Fault Format property.

If you include an output node in a message flow that starts with an HTTPInput node, it can be any of the supported output nodes (including user-defined output nodes). You can create a message flow that receives messages from Web service clients, and generates messages for clients that use all supported transports to connect to the broker. You can configure the message flow to request the broker to provide any conversion that is necessary.

If you create a message flow to use as a subflow, you cannot use a standard input node; you must use an instance of the Input node as the first node to create an In terminal for the subflow.

If your message flow does not receive Web service requests, use any of the other input nodes.

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

HTTPInput node icon

Using the HTTPInput and HTTPReply nodes to act as a web server

A broker can support multiple HTTPInput nodes. In the HTTPInput node you must specify the requests to which the node listens. If the broker is listening on address http://localhost:7080, for a request http://localhost:7080/Joe/Mary, the HTTP listener removes the HTTP address leaving the request (Joe/Mary). The listener then matches the request with the information that is specified in the URL selector of the HTTPInput node; this match is done from the most specific to the most generic data. For example, if the following values were specified in HTTPInput nodes:
/Joe /Joe/Mary /Joe/* /*
this format gets the message if no other node matches the request. So for the request: http://localhost:777/Joe/Mary, it matches Joe/*. If the request does not match any URL selector, and you do not have an input node with /* specified, the HTTPInput node returns a response to the originator. For example:
<html>
<head>
	<title>WebSphere MQ Integrator error report
	</title>
</head>
	<body>
		<h1>HTTP Status 404 - Resource Not Found</h1>
		URI /soap does not map to any message flow in broker VCP1BRK
		<p>
	<h3>WebSphere MQ Integrator 500</h3>
	</body>
</html>

You can use a URL of /* to catch any requests that failed to match the URLs in the HTTPInput nodes, enabling you to send a reply message and take other actions as appropriate.

The broker must be configured to use a port (the default is 7080). The HTTP listener is started in the administration task and listens on this port. When a request comes in, the listener sends the request to the HTTPInput node via a WebSphere MQ message.

You can use the mqsichangetrace command for the agent to collect trace information for the HTTP listener.

To process the log, use the mqsireadlog command with qualifier set to httplistener.

Using this node in a message flow

You can use the HTTPInput node in any message flow that needs to accept HTTP or HTTPS messages. The most common example is a message flow that implements a Web service. For more information, see Web service applications.

The HTTPInput node supports HTTP POST and HTTP GET. For more information about enabling HTTP GET, see HTTPRequest node.

Configuring the HTTPInput node

When you have put an instance of the HTTPInput node into a message flow, you can configure it. For more information, see Configuring a message flow node. To display its properties, either double-click the node, or right-click the node and click Properties.

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

Configure the HTTPInput node:

  1. Optional: On the Description page, enter a short description, a long description, or both. You can also rename the node on this page.
  2. On the Basic page:
    1. For Path suffix for URL, specify the path part of the URL from which this node receives Web service requests. Do not use the full URL. For example, specify /path/to/service, where the full URL is http://server/path/to/service.
    2. If the node is to accept secure HTTP, select Use HTTPS.
  3. On the Input Message Parsing page, set values for the properties that describe the message domain, message set, message type, and message format that the node uses to determine how to parse the incoming message:
    1. For Message Domain, select the name of the parser that you are using from the list. You can choose from:
      • MRM
      • XML
      • XMLNS
      • XMLNSC
      • JMSMap
      • JMSStream
      • IDOC
      • MIME
      • BLOB
    2. If you are using the MRM or IDOC parser, select the correct message set from the list in Message Set. This list is populated with available message sets when you select MRM or IDOC as the domain.

      Leave the Message Set field blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers.

    3. If you are using the MRM parser, select the correct message from the list in Message Type. This list is populated with messages that are defined in the message set that you have selected.

      Leave Message Type blank for XML, XMLNS, XMLNSC, JMS, IDOC, MIME, and BLOB parsers.

    4. If you are using the MRM or IDOC parser, select the format of the message from the list in Message Format. This list includes all the physical formats that you have defined for this message set.

      Leave Message Format blank for XML, XMLNS, XMLNSC, JMS, MIME, and BLOB parsers.

  4. On the Parser Options page, Parse Timing is, by default, set to On Demand. This value causes validation to be delayed until it is parsed by partial parsing. If you change this value to Immediate, partial parsing is overridden and everything in the message is parsed and validated, except for those complex types with a composition of Choice or Message that cannot be resolved at the time causing a validation failure. If you change this value to Complete, partial parsing is overridden and everything in the message is parsed and validated.
  5. On the Error handling page:
    1. Enter the Maximum client wait time timeout interval in seconds. This property specifies the length of time that the TCP/IP listener that received the input message from the Web service client waits for a response from the HTTPReply node in the message flow. If a response is received within this time, the listener propagates the response to the client. If a response is not received in this time, the listener sends a SOAP Fault message to the client indicating that its timeout has expired.
    2. Set Fault Format to SOAP 1.1, SOAP 1.2 or HTML.
  6. On the Validation page, set the validation properties for the MRM parser to validate the body of messages against the dictionary that is generated from the message set. (If a message is propagated to the Failure terminal of the node, it is not validated.)

    For more details, refer to Validating messages and Validation properties.

  7. Start of changeOptional: On the Security page, set values for the properties that control the authentication, authorization, and propagation of an identity on a message.
    • Optional: Select an option from the Identity Token Type list to specify the type of identity in the incoming message. If you leave this option blank, the identity is retrieved from the transport headers, and the type is set to usernameAndPassword.
    • Optional: In Identity Token Location, enter the location in the message where the identity is specified. If you leave this option blank, the identity is retrieved from the Authorization Transport headers.
    • Optional: In Identity Password Location, enter the location in the message where the password is specified. If you leave this option blank, the password is retrieved from the Authorization Transport headers.
    • Optional: In Identity IssuedBy Location, specify a string or path expression to show where (in the message) information about the issuer of the identity is held. If you leave this blank, the value from the User Agent header or the string HTTP is used.
    • Optional: In Security Profile, specify the name of the security profile to be used for processing the incoming identity.
    • Optional: Select Treat Security Exceptions as normal exceptions if you want security exceptions (such as Access Denied) to be treated as normal exceptions and propagated down the catch terminal (if it is wired). By default this is turned off, which ensures that the security exceptions cause the message to be backed out even if the catch terminal is wired.
    End of change

Connecting the terminals

The HTTPInput node routes each message that it retrieves successfully to the Out terminal. If message validation fails, the message is routed to the Failure terminal; you can connect nodes to this terminal to handle this condition. If you have not connected the Failure terminal, the message is discarded, the Maximum client wait time expires, and the TCP/IP listener returns an error to the client. There are no other situations in which the message is routed to the Failure terminal.

If the message is caught by this node after an exception has been thrown further on in the message flow, the message is routed to the Catch terminal. If you have not connected the Catch terminal, the message is discarded, the Maximum client wait time expires, and the TCP/IP listener returns an error to the client.

Terminals and properties

The HTTPInput node terminals are described in the following table:

Terminal Description
Failure The output terminal to which the message is routed if an error occurs.
Out The output terminal to which the message is routed if it is successfully retrieved.
Catch The output terminal to which the message is routed if an exception is thrown downstream and caught by this node.

The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk 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 HTTPInput node Description properties are described in the following table.

Property M C Default Description
Node name No No The node type, HTTPInput The name of the node.
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.

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

Property M C Default Description
Path suffix for URL Yes Yes   This property identifies the location from where Web service requests are retrieved. If the URL that you want is http://<hostname>[:<port>]/[<path>], specify either /<path> or /<path fragment>/* where * is a wild card that you can use to mean match any.
Use HTTPS No Yes Cleared This property identifies whether the node is to accept secure HTTP.

The HTTPInput node Input Message Parsing properties are described in the following table.

Property M C Default Description
Message Domain No No   The domain that is used to parse the incoming message.
Message Set No No   The name or identifier of the message set in which the incoming message is defined. All available message sets are in the list.
Message Type No No   The name of the incoming message.
Message Format No No   The name of the physical format of the incoming message.

The properties of the Parsing Options for the HTTPInput node are described in the following table.

Property M C Default Description
Parse Timing No No On Demand This property controls when an input message is parsed. Valid values are On Demand, Immediate, and Complete.

For a full description of this property,.refer to Parsing on demand.

Use XMLNSC Compact Parser for XMLNS Domain No No Cleared This property controls whether the XMLNSC Compact Parser is used for messages in the XMLNS Domain. If you set this property, the message data appears under XMLNSC in nodes that are connected to the output terminal when the input RFH2 header or Input Message Parsing properties Domain is XMLNS.
Retain mixed content No No Cleared This property controls whether the XMLNSC parser creates elements in the message tree when it encounters mixed text in an input message. If you select the check box, elements are created for mixed text. If you clear the check box, mixed text is ignored and no elements are created.
Retain comments No No Cleared This property controls whether the XMLNSC parser creates elements in the message tree when it encounters comments in an input message. If you select the check box, elements are created for comments. If you clear the check box, comments are ignored and no elements are created.
Retain processing instructions No No Cleared This property controls whether the XMLNSC parser creates elements in the message tree when it encounters processing instructions in an input message. If you select the check box, elements are created for processing instructions. If you clear the check box, processing instructions are ignored and no elements are created.

The HTTPInput node Error handling properties are described in the following table:

Property M C Default Description
Maximum Client Wait Time (sec) Yes No 180 The length of time, in seconds, for which the listener waits before sending an error message back to the client. The valid range is zero (which means an indefinite wait) to (231)-1.
Fault Format No Yes SOAP 1.1 The format of any HTTP errors that are returned to the client. Valid values are SOAP 1.1, SOAP 1.2 andHTML.

The Validation properties of the HTTPInput node are described in the following table:

Refer to Validation properties for a full description of these properties.

Property M C Default Description
Validate No Yes None This property controls whether validation takes place. Valid values are None, Content and Value, and Content.
Failure Action No No Exception This property controls what happens if validation fails. You can set this property only if you set Validate to Content or Content and Value. Valid values are User Trace, Local Error Log, Exception, and Exception List.
Include All Value Constraints No No Selected This property cannot be edited. Basic value constraint checks are included in Content and Value validation.
Fix No No None This property cannot be edited.
Notices | Trademarks | Downloads | Library | Support | Feedback

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

ac04565_ This topic's URL is: