Generate the Reverse CICS Web Service Provider Components

Provides step-by-step instructions that guide you through the process of generating all components of the Reverse CICS Web service provider from JSON.

Use the New CICS Web Service wizard to generate the components of your Web service provider.

  1. From the Application Explorer view, click the ReverseJSON project to select it.
  2. Click File > New > CICS Web Service. This starts the New CICS Web Service Wizard.
    Note: If CICS Web Service is not listed:
    1. Select Other.
    2. Expand Micro Focus Service Interface.
    3. Select CICS Web Service; then click Next.
  3. Under Service type, select JSON message processing.
  4. From the drop-down list, select CICS Web Service Provider (Top-Down, Request-Response); then click Next.

    The Project field is already populated with the name of the current project, ReverseJSON.

  5. Click the Browse button that corresponds to the JSON request field.
  6. Navigate to and select the reverse.json file, located in your project's schema folder.
  7. Click the Browse button that corresponds to the JSON response field.
  8. Navigate to and select the reverse.json file, located in your project's schema folder.

    You need to provide a URI that Enterprise Server can use to identify and locate the appropriate Web service upon receiving a request or a response. This information goes into the Service location field.

  9. In the Service location field, type /cics/services/json/reverse.
  10. Select CHANNEL from the Program interface drop-down list.

    The default container name is DFHWS-DATA, which is the top-level container used in service provider applications for CICS Web services.

  11. Click Next.
  12. In the Output artifacts group, type reverseJ into the Program name field. This is the name of the generated COBOL skeleton program.

    The file prefixes you supply for the Request file prefix and Response file prefix fields become the first part of the filenames of the generated copybooks that support the generated skeleton program file; one for request data structures, and one for response data structures.

  13. In the Request file prefix field, type REQ.
  14. In the Response file prefix field, type RESP.

    Enterprise Developer generates a WSBIND file that maps the JSON request to the data structure in the generated request copybook and maps the JSON response to the data structure in the generated response copybook. You need to provide a folder and filename for this file.

  15. Click the Browse button that corresponds to the WSBIND file field.
  16. On the Browse for WSBIND file dialog box, click New folder.
  17. In the field for the folder name, overwrite New folder with loadlib; then press Enter.
  18. Double-click the loadlib folder.
  19. In the File name field, type ReverseJ; then click Open.
  20. Click Finish.

Enterprise Developer generates the following CICS Web service components:

reverseJ.cbl
A skeleton CICS program.
reverseJ.svi
A service interface file.
REQ01.CPY
A copybook containing the COBOL data structures required to send a JSON request as input. This file is generated but does not appear in the Solution Explorer.
RESP01.CPY
A copybook containing the COBOL data structures required to receive a JSON response message as output.