In this scenario, the broker invokes an existing Web service implementation.
Key to symbols:
Your message flow creates an appropriately formatted Web service request, invokes the Web service, and parses the Web service response.
In this example the broker acts as an intermediary to the Web service.
If another application enabled for WebSphere MQ required the information in a different format then the message flow could arrange for the message to be propagated first to an MQOutput node for transmission to this application before continuing on to the end of the flow and the HTTPReply node which sends the expected Web service response. Appropriate Compute nodes would be required to transform the message (if required) and to manipulate the message headers (e.g. adding an MQMD header).
In this example the broker provides auditing for a Web service.
In this scenario, you typically clear the Replace input message with Web service response check box in the HTTPRequest node properties, and place the response from the corporate directory server in a temporary location in the message tree specified in the Response message location in tree property in the same node. In Compute2, you code ESQL to unpack the result, and augment the final message as appropriate.
Code ESQL in Compute1 to map the client request to a server request, and in Compute2 to map the server response to the client reply. You could define these request, reply, and response messages in the MRM domain to simplify the transformation from one format to another.
You can configure the HTTPRequest node to generate HTTP headers from the headers that are received by the HTTPInput node, which allows for cookies and other application-specific headers to be passed through. The HTTPReply node can provide an equivalent task to extract headers from the response from the Web service to return to the originating client. If you want this to be done, select the appropriate Generate default HTTP headers from..... check box on both the HTTPRequest and HTTPReply nodes.
In most scenarios, the original request is of no value, and you need only the response from the service to be able to generate the client reply message. If so, select the property Replace input message with Web service response on the HTTPRequest node. If you do want to preserve any data from the input request, you can store this in the LocalEnvironment in Compute1 and retrieve it in Compute2 for inclusion in the reply.