Configuring z/OS Connect for CICS for a CICS JSON web service

After initially configuring z/OS® Connect for CICS®, you can configure it for a CICS JSON web service. JSON web services are deployed to z/OS Connect for CICS in a similar way as to other CICS PIPELINE environments.

Before you begin

You must complete the basic configuration of z/OS Connect before you start this task. For z/OS Connect for CICS 1.0, see Configuring z/OS Connect for CICS 1.0. For z/OS Connect Enterprise Edition, see Configuring z/OS Connect Enterprise Edition. You also require a JSON WSBind file for each service you want to deploy; these binding files can be generated by using the CICS JSON assistant (the DFHLS2JSand DFHJS2LS utility programs). For more information on these utility programs, see The CICS JSON assistant.

About this task

JSON web services are deployed to z/OS Connect for CICS in a similar fashion to how they are deployed to other CICS PIPELINE environments.

Procedure

Results

You can test the configuration for z/OS Connect for CICS by typing this URL into a web browser: https://hostname:portnumber/zosConnect/apim/services. The hostname is the IP address or name of the CICS region that hosts z/OS Connect for CICS. The portnumber is the httpsPort that is configured in the <httpEndpoint> section of the server.xml configuration file. The web browser displays a list of the installed services.

The service is now ready to be called from a JSON client that uses the same hostname and portnumber.

Each installed Service has an entry in the zosConnect/apim/services list, for example:
{
"id":"EXAMPLE",
"name":"EXAMPLE",
"url":"https://hostname:portnumber/zosConnect/apim/services/EXAMPLE",
"protocol":"REST",
"description":"CICS Service"
}
In this example, the associated WEBSERVICE resource was named "EXAMPLE", and this Service definition was created dynamically by CICS when the EXAMPLE WEBSERVICE resource was installed. You can use a web browser to visit https://hostname:portnumber/zosConnect/apim/services/EXAMPLE that returns a document with more details about the Service, similar to the following:
{
"id":"EXAMPLE",
"name":"EXAMPLE",
"protocol":"REST",
"description":"CICS Service",
"restEndpoints":[
      {
       "name":"EXAMPLE",
       "address":"hostname:portnumber/jsonTests/myExampleService"
      }
   ]
}

In this example, the "address" is the URI at which the Service is exposed. This URI might be derived from information in a WSBind file, from an invokeURI attribute, or from the default z/OS Connect naming convention.

When a request arrives in the Liberty JVM server, it is associated with the z/OS Connect for CICS receiver that uses the information from the server.xml configuration file. A new CICS task starts to perform this work, and it is associated with a specific WEBSERVICE resource that uses the information from the URIMAP resource. The data transformation process occurs in the Liberty JVM server, and the target CICS program is attached, as named in the WSBind file.



zos_connect_configuring_json.html | Timestamp icon Last updated: Sunday, 4 June 2017