Creating the CICS infrastructure for a non-Java JSON
service provider
You can set up a non-Java environment for processing JSON requests by configuring a
provider pipeline with terminal handler DFHPIJT. To create the CICS® infrastructure for a non-Java JSON service provider, you must create a
pipeline configuration file and create a number of CICS
resources.
Restriction: If you use this non-Java JSON pipeline to process JSON requests, the
following restrictions apply:
RESTful JSON web services are not supported.
Context switch in the pipeline is not supported.
It is not possible to use SOAP and JSON web services in a JSON pipeline.
DFHPIJT only handles JSON messages. Receipt of a SOAP message results in an
error response.
Procedure
Define the transport infrastructure.
Define a TCPIPSERVICE resource that defines the port on which inbound requests are received. See
CICS resources for web services for details.
Define the message handlers that you want to include in the pipeline configuration file to
process inbound web service requests, and their responses.
If you want to perform your own processing in the pipeline, you must create a message handler.
See Message handlers for details. If you decide to create custom message handler
programs, to optimize performance you must make them threadsafe.
Create an XML pipeline configuration file that contains your message handlers.
In the configuration file, you must specify terminal handler program DFHPIJT
in a <terminal_handler> element as shown in Figure 1. DFHPIJT is the CICS-supplied JSON handler program
that enables non-Java processing of JSON messages.
Figure 1. Specifying terminal handler DFHPIJT for non-Java processing of JSON
messages
Note: When you use DFHPIJT as the terminal handler,
do not define an application handler in the pipeline configuration file, that is, the pipeline
configuration file should not contain an <apphandler> element. If an application
handler is specified, it is not invoked.
The PIPELINE resource defines the location of the pipeline configuration
file. It also specifies a pickup directory, which is
the z/OS UNIX directory that contains the web service
binding files. Repeat this step for each different pipeline configuration.
When you install a PIPELINE resource or perform a PIPELINE
SCAN, CICS reads the .wsbind files
in the specified pickup directory, and creates appropriate WEBSERVICE and URIMAP resources dynamically.
Unless you use autoinstalled PROGRAM definitions, create a PROGRAM resource for each program that runs in the
pipeline. These include the target application program, which normally runs under transaction CPIH.
The transaction is defined with the attribute TASKDATALOC(ANY). Therefore, when you
link-edit the program, you must specify the AMODE(31) option.
Results
You have created the infrastructure needed for each service provider and you
can now install these resources on your CICS system.
What to do next
Install the resources. You can extend the configuration when you need to do
so, either to define additional transport infrastructure, or to create additional
pipelines.