WebSphere

How to connect to CICS

You can connect to CICS® in a number of ways. This section shows some of the options.

Connect using a JCA adapter

If you use the CICS Transaction Gateway, you can connect to CICS using the IBM® CICS ECI Resource Adapter, which is a JCA adapter. The CICS ECI Resource Adapter is shipped with WebSphere® Integration Developer and the CICS Transaction Gateway. For more information on integrating CICS using the CICS ECI Resource Adapter, see: Click this link to go to the topic for WebSphere Integration Developer..

When you use the CICS ECI Resource Adapter, CICS programs can act as service providers (they cannot act as service requesters).

The WebSphere Integration Developer external service wizard works with the CICS ECI Resource Adapter to create services that call programs on a CICS server. You use the external service wizard to create a CICS import: the wizard helps you to configure the adapter; and also to develop and generate a service. The CICS import is an import with an enterprise information system (EIS) binding that connects to the CICS ECI Resource Adapter, which in turn connects to the CICS Transaction Gateway. For more information on how to create the CICS import see: Click this link to go to the topic for WebSphere Integration Developer..

Figure 1. Using a CICS JCA adapter
A service requester can communicate with the ESB through an export; then the ESB can communicate with the CICS ECI Resource Adapter.

Connect using a Web service

CICS provides a Web service interface that allows you to integrate CICS programs using Web services. Because WebSphere ESB and WebSphere Process Server provide support for Web services, you can connect to CICS using the CICS Web service interface. At run time, WebSphere ESB or WebSphere Process Server, mediates between the Web service interface provided by CICS, and the interface expected by the service requester or service provider.

The CICS Web service interface is bidirectional; therefore, CICS applications can act as service requestors or service providers. If a CICS program needs to act as a service requester, you must create a Web services export to connect to the CICS Web service; if a CICS program needs to act as a service provider, you must create a Web services import to connect to the CICS Web service.

This scenario involves working with the CICS Web service support; therefore, it requires some knowledge in this area. For more information on implementing CICS Web services, see: Application Development for CICS Web Services.

Figure 2. Using the CICS Web service interface
A service requester can communicate with the ESB; the ESB can communicate with the CICS Web service interface through a Web services import.

Connect using the WebSphere MQ-CICS bridge

WebSphere MQ for z/OS® has an MQ-CICS bridge, so you can communicate with CICS through WebSphere MQ. WebSphere Enterprise Service Bus and WebSphere Process Server provide MQ bindings on imports and exports, and you can use MQ bindings to communicate either with WebSphere MQ or with the WebSphere MQ-CICS bridge.

If you want to use the MQ-CICS bridge you need to create data bindings for the MQ body and header: the data bindings must construct MQ messages in the correct format for the bridge.

When you use WebSphere Integration Developer to generate a WebSphere MQ import binding, the tools can help you generate an MQ binding with suitable data bindings for the operation. To construct a WebSphere MQ message body that can be handled by the bridge, you need to select the data binding option: MQ adapter language data binding generator.
Figure 3. Using the MQ-CICS bridge
A service requester can communicate with the ESB through an export; then the ESB can communicate with either WebSphere MQ or the MQ-CICS bridge.

You can set, clear, or retrieve some information carried in the MQ message header structures defined by the MQ CICS Bridge. For example, you can set values in the MQCIH header, then send the MQ message to a CICS application, through the MQ CICS Bridge. In WebSphere Enterprise Service Bus, MQCIH header values can be set dynamically using meditation primitives, or statically by setting MQImport binding properties. In WebSphere Process Server, MQCIH header values can be set statically in a business module by setting MQImport binding properties.

From your WebSphere Enterprise Service Bus or WebSphere Process Server application, you can create a call to a CICS service, through the MQ CICS bridge. Your application can handle the response from the CICS service. The response could be a fault message. To handle the response, use WebSphere Integration Developer to add an MQ Import connecting to the WebSphere MQ queue supported by the MQ CICS Bridge. You then configure your application to add the required MQCIH header to the message. When your application runs, an MQ request message is sent to the CICS service through the MQ CICS Bridge. The CICS service returns a response to your application through the MQ CICS Bridge. The MQ headers in the response will include MQCIH headers. The response could be a fault message, and must be handled.

A WebSphere Enterprise Service Bus application can mediate a request from an MQ Client, where the request already has an MQCIH header. This request can be forwarded on to a CICS service, through the MQ CICS Bridge. The WebSphere Enterprise Service Bus application can add, modify, or remove the MQCIH header, and returns the CICS response to the client. The response could be a CICS fault, and must be handled correctly.

Draft comment:
Diagram from Use case could appear here.

A WebSphere Enterprise Service Bus application can mediate a request from an MQ Client, where the request already has an MQCIH header, and is received from the MQ CICS Bridge. The WebSphere Enterprise Service Bus application can add, modify, or remove the MQCIH header, and then forward the request to a non-CICS service. The service response is returned to the client.

Draft comment:
Diagram from Use case could appear here.


concept Concept topic

Terms of use | Feedback


Timestamp icon Last updated: 20 June 2010 00:38:43 BST (DRAFT)


http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r2mx/topic//com.ibm.websphere.wbpm.scenarios.esb1.620.doc/concepts/cwesb_scenario_cics.html
Copyright IBM Corporation 2005, 2010. All Rights Reserved.
This information center is powered by Eclipse technology (http://www.eclipse.org).
iDoc on