CICS as a service requester
For CICS to invoke an external service, an application program sends a request that is passed through a pipeline to a target service. The response from the service is returned to the application program through the same pipeline.
Figure 1 shows an example configuration of the architecture and resources that are required to process a request from a CICS application program for data from a service provider that is external to the CICS region, using a Java pipeline.
- Build a request using data provided by the application program.
When the CICS application program initiates a request to a service provider that is external to the CICS region, the requestor application calls the EXEC CICS INVOKE SERVICE command. The EXEC CICS INVOKE SERVICE command invokes the pipeline. The pipeline converts the application language structure into a language that the service provider can process, for example a SOAP message.
- Send the request to the service provider.
CICS sends the request message to the remote service provider by using either HTTP or WebSphere MQ.
- Receive a response from the service provider.
When the service provider response message is received, CICS passes the message back to the pipeline.
- Examine the response, and extract the contents that are relevant to the original application
program.
The pipeline converts the service provider response message into the application language structure, which is passed to the application program. Control is then returned to the application program.