HTTP :
HTTPInput node :
Use the HTTPInput node to receive an HTTP message from an HTTP client for processing by a message flow.
-When the HTTPInput node receives a message from a web service client, the node starts 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 local environment tree at LocalEnvironment.Destination.HTTP.RequestIdentifer. This value is used by the HTTPReply node, therefore you must not modify it.
- HTTP messages are always non-persistent, and have no associated order.
- HTTP uses port 7080, which is the default HTTP port for the broker-wide listener.
- The default port numbers for the embedded execution group listener are 7800 for HTTP and 7843 for HTTPS.
Note:You can change these port numbers, and port ranges used by the execution group listeners, by using the mqsichangeproperties command.
Terminals:
Failure : The output terminal to which the message is routed if an error occurs(If message validation fails).If you have not connected the Failure terminal, the message is discarded, the Maximum client wait time expires, and an error is returned to the client.
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.If you have not connected the Catch terminal, the message is discarded, the Maximum client wait time expires, and an error is returned to the client.
HTTP Timeout : The output terminal to which a timeout fault message is routed if the HTTP Reply node that is connected to the Out terminal does not respond within the time interval specified by the Maximum client wait time property.
Path suffix for URL :
This property identifies the location from where web service requests are retrieved. Do not use the full URL. If the URL that you want is http://hostname[:port]/[path], specify either /path or /path fragment/* where * is a wildcard that you can use to mean match any.
Use HTTPS :This property identifies whether the node is to accept secure HTTP. If the node is to accept secure HTTP, select the check box.
Advanced Properties:
- Set destination list : This property specifies whether to add the method binding name to the route to label destination list. If you select this check box, the method binding name is added so that you can use a RouteToLabel node in the message flow after the HTTPInput node.
- Label prefix : The prefix to add to the method name when routing to label. Add a label prefix to avoid a clash of corresponding label nodes when you include multiple WebSphere Message Broker input nodes in the same message flow. By default, there is no label prefix, therefore the method name and label name are identical.
- Parse Query String : This property causes any query string that is present with an incoming message to be parsed and decoded (according to http://tools.ietf.org/html/rfc3986) into the following location in the local environment as a series of name-value elements that match the names and values present in the query string:
LocalEnvironment.HTTP.Input.QueryString
For example, for this query string:
?myParam1=my%22Value%221&myParam2=my%22Value%222
-The following elements are placed into the local environment under the QueryString
folder:
- myParam1 with a value of my"Value"1
- myParam2 with a value of my"Value"2
- Decompress input message :This property indicates whether an inbound HTTP request is decompressed or not.If this option is selected, and the HTTP header Content-Encoding field is "gzip" or "deflate", the input message is decompressed and propagated to the Out terminal, and the Content-Encoding field is removed.
Note : “Input Message Parsing” , “Parse Options” & Validation for HttpInput node are same as MQInput node.
Error handling properties :
- Maximum client wait time (sec) : Default(180)
-The length of time, in seconds, for which 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. The valid range is zero (which means a short wait) through (231)-1. 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, a fault message is generated indicating that the timeout has expired. This fault message is either sent by the listener or timeout terminal processing.
- Fault format : The format of any HTTP errors that are returned to the client. Valid values are SOAP 1.1, SOAP 1.2, and HTML.
HTTP Reply node :
--Use the HTTPReply node to return a response from the message flow to an HTTP client. This node generates the response to an HTTP client from which the input message was received by the HTTPInput node, and waits for confirmation that it has been sent.
-The HTTPReply node constructs a reply message for the Web service client from the entire input message tree, and returns it to the requester. If the message was initially received by an HTTPInput node in another message flow, the response is associated with the reply by a request identifier that is stored in the local environment of the message by the HTTPInput node.
Terminals:
Failure : The output terminal to which the message is routed if a failure is detected when the message is propagated.
In : The input terminal that accepts a message for processing by the node.
Out : The output terminal to which the message is routed if it has been propagated successfully, and if further processing is required in this message flow.
Ignore transport failures : Select Ignore transport failures 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 (sec).
Reply send timeout (sec) :Set the Reply send timeout (sec) value if you are not ignoring transport failures. This property specifies the length of time, in seconds, that the node waits for an acknowledgment that the client has received the reply. If the acknowledgment 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 acknowledgment 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 acknowledgment is not received in time, an exception is generated.
Generate default HTTP headers from reply or response : Select Generate default HTTP headers from reply or response if you want the default Web service headers to be created using values from the HTTPReplyHeader or the HTTPResponseHeader. If the appropriate header is not present in the input message, default values are used.
HTTP Request node :
-The HTTPRequest node interacts with a web service, using all or part of the input message as the request that is sent to that service.You can also configure the node to create an output message from the contents of the input message, augmented by the contents of the web service response/reply, before you propagate the message to subsequent nodes in the message flow.
-Depending on the configuration, this node constructs an HTTP or an HTTP over SSL (HTTPS) request from the specified contents of the input message, and sends this request to the web service. The node receives the response from the web service, and parses the response for inclusion in the output tree. The node generates HTTP headers if they are required by your configuration.
Note: You can use this node in a message flow that does or does not contain an HTTPInput or HTTPReply node because provider flow can be anywhere but only WebService URL to access that provider is required.
- An HTTP request has two parts:
- The URL of a service.
- A stream of data that the remote server processes, then sends back a response, which is often a SOAP or other web service message in XML.The data must be in CCSID 1208 format for most requests.
Terminals:
Out : If the request is successful, the HTTPResponse is inserted into the front of the message tree, the reply placed in the specified location in the tree, and the request propagated to the Out terminal.
Failure :If the HTTPRequest node is not able to issue the request, an ExceptionList is inserted into the message tree and the tree is propagated to the Failure terminal.You can specify a timeout interval, so that if the request takes longer than the specified duration, the request is propagated to the Failure terminal with an appropriate message
Error : If the request is sent successfully by the HTTPRequest node, but the web service is not successful, the HTTPResponse is inserted into the message tree, and propagated to the Error terminal.
Handling errors :
The node interacts directly with an external service using TCP/IP; it can, therefore, experience the following types of error:
- Errors that are generated by TCP/IP, for example no route to host or connection refused.
If the node detects these errors, it generates an exception, populates the exception list with the error information that is received, and routes the input message unchanged to the Failure terminal.
-Errors that are returned by the web server. These errors are represented by HTTP status codes that are outside the range 100 - 299. If the node detects these errors, it routes the reply to the Error terminal while following the properties specified on the Error tab.
Replace input with error : For the web service error message to be included in the output message with part of the input message content, clear Replace input with error and set the Error message location property(say,OutputRoot.XMLNSC.ABC.DEF).
HTTP Response Codes :
100 - 'continue' response
200 - success
300 - redirection
HTTP Settings :
- HTTP(S) proxy location : set the location of the proxy server to which requests are sent.
- Follow HTTP(S) redirection : To specify how the node handles web service responses that contain an HTTP status code of 300 to 399(If you select the check box, the node follows the redirection that is provided in the response, and reissues the web service request to the new URL (included in the message content).)
- Use Compression : To specify the compression of the content of the HTTP request.
Advanced Properties :
Use whole input message as request : For the request message to be the whole input message body, leave Use whole input message as request selected (the default setting).
Request message location in tree : For the request message to contain a subset of the input message, clear Use whole input message as request and set the Request message location in tree property(Say,InputRoot.XMLNSC.ABC).
Replace input message with web-service response : For the whole web service response message to be propagated as the output message, leave Replace input message with web-service response selected (the default setting).
Response message location in tree : For the web service response message to be included in the output message with part of the input message content, clear Replace input message with web-service response and set the Response message location in tree property(say,OutputRoot.XMLNSC.ABC.DEF).
No comments:
Post a Comment