CICS processing of services

When an application calls a service, for example a web service requester sends a SOAP message or a CICS® application uses the INVOKE SERVICE API command, CICS uses pipelines to process the request.

CICS processes XML-based services in service requester and service provider pipelines. Each type of pipeline has a transport handler that can send requests over the network. A CICS application can be a web service requester or a web service provider to an external client and use the HTTP, HTTPS, JMS, or IBM® MQ protocols to send and receive requests.

When the web services are both CICS applications, the service requester can use the INVOKE SERVICE command and a URI that begins with cics:// to optimize the pipeline processing. The data transformations to turn the binary data into XML take place as usual, the pipeline runs through the message handlers, and the pipeline transport handler links to another program or starts a pipeline depending on which type of URI is specified.

For example, you can use the cics://SERVICE/ service ?targetServiceUri= targetServiceUri URI to run the request through a provider pipeline without the overhead of using the network. CICS uses the service and targetServiceUri values to resolve the request using a URIMAP.

This URI might be useful when the requester and provider applications are written in different languages, or use different mapping levels, and expect different binary data.

CICS processes calls to channel-based services by using an EXEC CICS LINK PROGRAM to pass the channel and containers to the program that is defined in the SCDL for the service. If the calling application also provides a URI that begins with cics:// , CICS can perform additional processing in a requester pipeline. If the binding does not specify a requester pipeline, CICS creates one dynamically for the request.

URI formats

If the URI begins with cics:// , the pipeline transport handler can either link to a program, start another requester pipeline, or start a provider pipeline. There are three types of URI:

cics://PROGRAM/ program
The pipeline processing of this URI type is similar to the local optimization that takes place for web service requester and providers that are in the same CICS region. program defines the name of the program that the transport handler links to at the end of the requester pipeline processing. The transport handler uses an EXEC CICS LINK PROGRAM command to pass the channel and its containers to the specified program. CICS can also pass a COMMAREA to the program if an additional option appears in the URI.
cics://SERVICE/ service ?targetServiceUri= targetServiceUri
The pipeline processing of this URI type optimizes the request by not sending it over the network. However, the request runs through both a requester and provider pipeline. The service value defines the name of a service rather than a specific program. The targetServiceUri value defines the path of the service, which is resolved by a URIMAP resource. The transport handler uses the URIMAP to send the request to the correct provider pipeline in the same CICS region.
cics://PIPELINE/ pipeline ?targetServiceUri= targetServiceUri
The pipeline value defines the name of a requester pipeline and the transport handler puts the value of targetServiceUri in DFHWS-URI before starting the specified requester pipeline. This URI type can chain a number of requester pipelines together, so that the request can be processed by different sets of message handlers.

Alternatively, a message handler in the pipeline can override the URI provided by the application to control the pipeline processing.

For details of the parameters that you can specify on these URIs, see DFHWS-URI.