About the Web Service sample
The Web Service 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. The message flow is designed so that multiple
instances of the Web service can run concurrently. This is achieved by storing the HTTP context (the reply identifier) in a "state" queue
along with the correlation identifier of the message sent to the legacy application.
- Path 1:
- A SOAP message is received 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.
- This 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 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 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.
Note that although the message structures 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. This is because it was considered important to demonstrate the WSDL import facility.
The message flow performs the following actions:
- A legacy message is received using WebSphere MQ transport.
- A Web service request is built using data from the message.
- The Web service request is sent using HTTP transport.
- The Web service reply message is received using HTTP transport.
- A new message in the legacy format is built using data from the Web service reply.
- This message is sent to a WebSphere MQ reply queue.
Back to sample home