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
- In the
Application Explorer view, expand
Enterprise Developer > Enterprise Development Projects.
- Right-click the
filmsREST project, and then select
New > Interface > CICS Web Service from the context menu.
- Under
Service type, select
JSON message processing.
- 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.
- Click the
Browse button that corresponds to the
JSON schema field.
- Navigate to and select the
films.json file, located in your project's
schema folder.
- In the
Service location field, type
/cics/services/json/film/*.
- Under
HTTP methods, check
GET,
POST,
PUT, and
DELETE.
- 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.
- Click
Next.
- Specify output artifacts
- In the
Output artifacts group, you specify names and locations for request and response schema files.
- In the
Program name field, type
FILMREST. This is the name of the 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.
- In the
Copy file prefix field, type
films.
- Click
Finish.
Enterprise Developer generates the following CICS Web service components:
- FILMREST.cbl
- A skeleton CICS program for a RESTful service.
- film01.cpy
- A copybook containing data structures.
- loadlib/filmrest.wsbind
- The binary file that maps JSON messages to and from COBOL.