CICS as a service provider

For CICS to provide a service to an external service requester, it must receive the service request and pass it through a pipeline to the target application program. The response from the application is returned to the service requester through the same pipeline.

Figure 1 shows an example configuration of the architecture and resources that are required to process a request from an external service requester when CICS is a service provider using a Java pipeline.

Figure 1. The architecture and resources for a service provider
The figure show a service requester that is external to the CICS region initiating a request to a CICS application program. The CICS region that the application program runs in also contains the TCPIPSERVICE, URIMAP, PIPELINE, and WEBSERVICE resources; the pipeline and its handlers and a JVM server.
To process a request, CICS must perform the following operations:
  1. Receive the request from the service requester.

    The TCPIPSERVICE resource specifies a port for incoming requests. This port is monitored by the CICS-supplied sockets listener transaction (CSOL).

  2. Examine the request, and extract the contents that are relevant to the target application program.

    When the request message is received on the appropriate port, the URIMAP resource definitions are scanned for a URIMAP definition that has its USAGE attribute set to PIPELINE and its PATH attribute set to the URI found in the request. If an appropriate URIMAP definition is found, the PIPELINE and WEBSERVICE definitions from the PIPELINE and WEBSERVICE attributes of the URIMAP definition are used. The TRANSACTION attribute of the URIMAP definition determines the name of the transaction that should be attached to process the pipeline. By default the CPIH transaction is used. The URIMAP definition also identifies the PIPELINE and WEBSERVICE resources to use. These resources control the processing that CICS performs.

  3. Invoke the application program, passing data extracted from the request.

    The message handlers in the pipeline and the application handler convert the request message into application language structure that the service provider application program expects. The program processes this input and returns a response to the application handler.

  4. Construct a response using data returned by the application program, and send a response to the service requester.

    The application handler and message handlers convert the response message received from the service provider application into a message in the format of the original request. This message is sent back to the service requester.

Some of the processing within the pipeline can be performed using the zEnterprise® Application Assist Processor (zAAP) if the pipeline is configured appropriately. For more information, see Java-based SOAP pipelines.