Configuring an existing CICS transaction as a JSON web service (SC11)

This scenario shows how to configure the CICS® TG mobile support to pass a request from a JSON web services client application to the EC03 program on a CICS server and receive a response.

The following diagram shows the path that is taken by the request and response from a JSON web service client to the CICS TS EC03 sample program through CICS TG.
Scenario 11 demonstrates a connection from JSON web service client to CICS TS EC03 sample program through CICS TG.

The files for this scenario are installed in UNIX directory <install path>/samples/scenarios/sc11 and in the <install.hlq>SCTGSAMP library.

The files stored in <install path>/samples/scenarios/sc11 are:
  • ec03in.xml is the channel description document of the request sent to the CICS server program EC03.
  • ec03out.xml is the channel description document of the reply from the CICS server program EC03.
  • ctgec03.ini contains the relevant sections from the CICS TG configuration file required to implement this scenario.
  • ec03req.json is the request json schema.
  • ec03resp.json is the reply json schema.
  • ec03.wsbind is the web service bind file.
The files stored in the SCTGSAMP library are:
  • CTGE3L2J - JCL to run the JSON web services assistant.
  • CTGE3LEN - the COBOL copybook containing the language structure used by the EC03 sample program to read the binary data passed in on the BIT container.
This scenario shows you how to produce a web services bind file from two channel description documents (CDDs). The channel description documents describe the input and output of the EC03 CICS server sample that is included in <install path>/samples/server/ec03.cpp. The following diagram shows the inputs and outputs for the JSON web services assistant.
Diagram showing inputs and outputs for the JSON web service assistant.

The bind file and JSON Schema that are produced are included so that you can configure a web service without going through the process of producing the bind file from CDDs. An extract from a CICS TG configuration file is also included to show the relevant sections of the CICS TG configuration file to configure a web service with this bind file.

The following diagram shows the relationship between the ctg.ini configuration file and the WSBind file
Diagram showing relationship between ctg.ini configuration file and the WSBind file

The JSON Schema files are provided for you to use in your client application.