Creating a service provider application from a JSON schema

Using the CICS® JSON assistant, you can create a service provider application from a JavaScript Object Notation (JSON) schema.

Before you begin

Before you can create a service provider application, the following conditions must be satisfied:

About this task

You can use the JSON assistant to create language structures from your JSON schema for the service provider application.

Procedure

  1. Use the DFHJS2LS batch program to generate a web service binding file and one or more language data structures. DFHJS2LS contains a large set of optional parameters that provide you with flexibility to create the binding file and language structures that your application requires. Consider these options when you enable an existing application for web services:
    • Which mechanism will CICS use to pass data to the service provider application program? You can use channels and pass the data in containers or use a COMMAREA. Channels and containers are recommended. Specify them with the PGMINT parameter.
    • Which language do you want to generate? DFHJS2LS can generate COBOL, C/C++, or PL/I language data structures. Specify the language using the LANG parameter.
    • Which mapping level do you want to use? The higher the mapping level, the more control and support you have available for the handling of character and binary data at run time. Some optional parameters are available only at the higher mapping levels. You are recommended to use the highest level of mapping available. Specify the mapping level with the MAPPING-LEVEL parameter.
    • Which URI do you want the web service requester to use? Specify a relative URI using the URI parameter; for example, URI=/my/test/webservice. The value is used by CICS when it creates the URIMAP resource.
    • Under which transaction and user ID will you run the web service request and response? You can use an alias transaction to run the application to compose a response to the service requester. The alias transaction is attached under the user ID. Specify it with the TRANSACTION and USERID parameters. These values are used when creating the URIMAP resource. If you do not want to use a specific transaction, do not use these parameters.
    When you submit DFHJS2LS, CICS generates the web service binding file and places it in the location that you specified with the WSBIND parameter. The language structures are placed in the partitioned data set that you specified with the PDSLIB parameter.
  2. Copy the generated web service binding file to the pickup directory of the provider mode PIPELINE resource that you want to use for your web service application. You must copy the binding file in binary mode.
  3. Write a service provider application program to interface with the generated language structures and implement the required business logic.
  4. Use the PIPELINE SCAN command to dynamically create the WEBSERVICE resource and a URIMAP resources.
    • The WEBSERVICE resource encapsulates the web service binding file in CICS and is used at run time.
    • The URIMAP resource provides CICS with the information to associate the WEBSERVICE resource with a specific URI.
    Alternatively, you can define the resources yourself, although this is not recommended.

Results

If you have any problems submitting DFHJS2LS, or the resources do not install correctly, see Troubleshooting the JSON assistant.


dfhws_deploy_provider_from_json.html | Timestamp icon Last updated: Thursday, 27 June 2019