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 and the location for the WSBIND file.
- 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.
- 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.
- Click the
Browse button that corresponds to the
WSBIND file field.
- On the
Browse for WSBIND file dialog box, click
New folder.
- In the field for the folder name, overwrite
New folder with
loadlib; then press
Enter.
- Double-click the
loadlib folder.
- In the
File name field, type
filmREST; then click
Open.
- 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.