About the Web Services using HTTP nodes sample
The Web Services using HTTP nodes sample has two parts:
- A Web Service Host sample
- A Web Service Client sample
About the Web Service Host sample
The Web Service Host sample demonstrates how to provide a legacy application as a Web service.
In this sample, the supplied legacy application is called by sending a WebSphere MQ message
to a queue. The format of this message is mapped to a C header file.
The sample comprises two message flow paths, implemented in a single message flow.
Multiple instances of the Web service can run concurrently in the message flow.
To enable multiple instances of the Web service to run concurrently in the message flow the HTTP context
(the reply identifier) is stored in a "state" queue
with the correlation identifier of the message that is sent to the legacy application.
- Path 1:
- A SOAP message is received by using HTTP transport.
- The message flow transforms the SOAP message to the legacy format.
- The legacy format message is put on a WebSphere MQ queue to call the legacy application.
- The HTTP context is built into a second message (the state message), which is correlated to the
message that was sent to the legacy application.
- The state message is sent to a WebSphere MQ queue for later retrieval (see Path 2).
- Path 2:
- A reply is received from the legacy application by using WebSphere MQ transport.
- A state message is retrieved from a WebSphere MQ queue.
- The legacy message data is incorporated into a SOAP message body.
- The HTTP context is set from the state message.
- The SOAP response message is sent by using HTTP transport.
About the Web Service Client sample
The Web Service Client sample demonstrates how a message flow can be a client to a Web service.
The Web Service Client sample calls the Web Service Host sample.
Although the message structures that are used by the Web Service Client sample are the same as the message
structure in the Web Service Host sample,
a different message set is used to demonstrate the WSDL import facility.
The message flow performs the following actions:
- A legacy message is received by using WebSphere MQ transport.
- A Web service request is built by using data from the message.
- The Web service request is sent by using HTTP transport.
- The Web service reply message is received by using HTTP transport.
- A new message in the legacy format is built by using data from the Web service reply.
- This message is sent to a WebSphere MQ reply queue.
Back to sample home