Generate filmsREST Web Service Components

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

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

Create the filmsREST Web service

  1. In the Application Explorer view, expand Enterprise Developer > Enterprise Development Projects.
  2. Right-click the filmsREST project, and then select New > Interface > CICS Web Service from the context menu.
  3. Under Service type, select JSON message processing.
  4. From the drop-down list, select CICS Web Service Provider (Top-Down, RESTful); then click Next.

Specify Web service details

Here you identify JSON schema, HTTP methods, and output artifacts.

Define schema and methods
On the New CICS JSON Web Service page, the Project field is already populated with the name of the current project, filmsREST.
  1. Click the Browse button that corresponds to the JSON schema field.
  2. Navigate to and select the films.json file, located in your project's schema folder.
  3. In the Service location field, type /cics/services/json/film/*.
  4. Under HTTP methods, check GET, POST, PUT, and DELETE.
  5. 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.

  6. Click Next.
Specify output artifacts
In the Output artifacts group, you specify names and locations for request and response schema files and the location for the WSBIND file.
  1. In the Program name field, type filmREST. This is the name of he generated COBOL skeleton program.

    The file prefix you supply for the Copy file prefix field becomes the first part of the filename of the generated copybook that supplies the generated skeleton program file with both request data structures and response data structures.

  2. In the Copy file prefix field, type films.

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

  3. Click the Browse button that corresponds to the WSBIND file field.
  4. On the Browse for WSBIND file dialog box, click New folder.
  5. In the field for the folder name, overwrite New folder with loadlib; then press Enter.
  6. Double-click the loadlib folder.
  7. In the File name field, type filmREST; then click Open.
  8. Click Finish.

    Enterprise Developer generates the following CICS Web service components:

    A skeleton CICS program for a RESTful service.
    A copybook containing data structures.
    The binary file that maps JSON messages to and from COBOL.