This topic provides information which may be useful if you are using HTTP message flows to interact with Web services. You may find it useful to read this in conjunction with the subsequent Web services scenarios section.
For example, if you design a pair of message flows that interact with an existing WebSphere MQ application (as described in Broker calls existing Web service), you can save this value in the request flow and restore it in the reply flow to ensure that the correct client receives the reply. If you do so, you must not change the data, and you must retain the data as a BLOB.
The HTTPReply node extracts this value from LocalEnvironment and sets up the reply so that it is sent to the specific client.
If you design a message flow that includes both an HTTPInput and an HTTPReply node, the value is set into the LocalEnvironment by the HTTPInput node, but the HTTPReply node does not use it. Therefore if your message flow includes both nodes and a Compute node in the same flow, you do not have to include the LocalEnvironment tree when you specify which components of the message tree are copied from input message to output message by the Compute node (the Compute mode property).
Although you can also set the request URL in the special header X-Original-HTTP-URL in the HTTPRequestHeader section of the request message (which overrides all other settings) in a Compute node, you are recommended to use the LocalEnvironment content for this purpose.
CALL CopyMessageHeaders(); SET OutputRoot.HTTPReplyHeader."Content-Type" = 'text/xml'; SET OutputRoot.XMLNS = InputRoot.XMLNS;
In the particular case of Content-Type, do not set this header using the ContentType property unless you are working in the MIME domain. The ContentType property is specifically intended to set the value of Content-Type used in MIME.
If an HTTPReplyHeader section existed in the message received by the HTTPReply node, and the Output terminal of the HTTPReply node is connected, the HTTPReplyHeader section is updated with any changed or added values.
CALL CopyMessageHeaders(); SET OutputRoot.HTTPRequestHeader."Content-Type" = 'text/xml'; SET OutputRoot.XMLNS = InputRoot.XMLNS;In the particular case of Content-Type, do not set this header using the ContentType property unless you are working in the MIME domain. The ContentType property is specifically intended to set the value of Content-Type used in MIME.
If an HTTPRequestHeader exists in the received message, the HTTPRequestHeader is updated with any changed or added values.
Notices |
Trademarks |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
ac20450_ |