Includes tutorials that walk you through the process of using
Enterprise Developer and
Enterprise Server to generate and run several types CICS Web services.
Assumptions
These tutorials are written from the perspective that all of the following is true. Specific instructions for setting up your
environment to adhere to these assumptions is found in the
Before you begin a CICS Web service tutorial section that follows
- You have reviewed the
Assumptions and
Before you begin these tutorials sections in the
Tutorials: CICS topic to ensure that your environment is set up properly.
- You have extracted all provided demonstration files to a temporary directory on your local drive.
- You have installed a SOAP and/or a JSON requester tool.
Before you begin a CICS Web service tutorial
- Install a SOAP and/or JSON requester tool
- Each of the
Tutorial: CICS Web Service Provider... tutorials require that you have either a SOAP or a JSON requester tool installed, depending on the type of provider you create.
The tutorials are not specific to any particular requester tools; therefore install those of your choice.
- Extract demonstration files
-
- Extract the
CICSWebServicesProjectTemplate_VS.zip file, located in the
%PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\CICS\Classic\CWS directory, to a temporary directory on your local drive.
- Take note of the location as you need to reference it when working through the CICS Web services tutorials.
Demonstration Project
Rather than creating new projects from scratch,
Enterprise Developer provides a template project to use as a starting point for each tutorial. The template project,
CWSProject, contains most of the project components and files you need to complete all of the tutorials, although not all are used in
every tutorial. The template is contained in the
CICSWebServicesProjectTemplate_VS.zip archive file, located in the
%PUBLIC%\Documents\Micro Focus\Enterprise Developer\Samples\Mainframe\CICS\Classic\CWS directory. A few of the required files that, by design, are not contained in the
.zip file are stored in the directory itself.
- CICS COBOL applications
- Components for each of the following CICS COBOL applications are provided in the template:
- Reverse Application
- The Reverse application is a CICS COBOL application that takes one or more character strings as input, reverses each of them,
and sends the reversed strings as output.
- InvokeReverse Application
- The InvokeReverse application is generated from an existing WSDL file. With it, you invoke the Reverse application running
in an
enterprise server region.
- ReverseJSON Application
- The ReverseJSON application is a CICS COBOL application that takes a character string as input, reverses it, and sends the
reversed string as output.
- InvokeReverseJSON Application
- The InvokeReverseJSON application is generated from an existing JSON file. With it, you invoke the Reverse application running
in an
enterprise server region.
- LoanDemo and
LoanJSON Applications
- LoanDemo
and LoanJSON
consist of a CICS application, loanPaym, that simply accepts a Principal amount, a Loan Term amount, and a Rate amount. These
three input values are required to calculate and return a Monthly Payment amount.
- BookREST Application
- The BookREST application is a CICS COBOL application that stores and retrieves book records, which include title, author,
genre, stock inventory number, and inventory and sale amounts.
- CWSProject files
- The CWSProject includes the following files:
- CWSProject.cblproj
- A Visual Studio project file used as a template to create a solution and all projects.
- book.cbl
- A CICS COBOL program used to create a RESTful Web service provider using the top-down method.
- BookR02.cpy
- A copybook that defines the container structure for the book program.
- book-rec.cpy
- A copybook that defines the bookfile record structure for the book program.
- loanPaym.cbl
- A CICS COBOL program used to create a CICS Web service provider using the bottom-up method.
- LOANIN.cpy
- A copybook that contains the input structure for the loanPaym program.
- LOANOUT.cpy
- A copybook that contains the output structure for the loanPaym program.
- revLogic.cpy
- For WSDL tutorials, a copybook that contains the business logic for the generated Web service.
- revJson.cpy
- For JSON tutorials, a copybook that contains the business logic for the generated JSON Web service.
- invkRevJ.cbl
- For JSON tutorials, a program that invokes a JSON request.
- CICSWebServicesTemplate.xml
- An
Enterprise Server template used to create an
enterprise server region on which to run CICS Web services.
- BookREST.json
- A JavaScript Object Notation (JSON) file that describes a RESTful CICS Web service.
- reverseReq.json
- A JavaScript Object Notation file that describes the input structure for a CICS Web service.
- reverseResp.json
- A JavaScript Object Notation file that describes the output structure for a CICS Web Service.
- loadlib
- Initially empty, this folder is created and configured to contain
build
files generated by
Enterprise Developer.
- dfhdrdat
- A resource definition file that defines the resources required to run the Web service on
Enterprise Server.
- reverse.wsdl
- A Web Service Description Language (WSDL) file that describes a CICS Web service.
- basicsoap11provider.xml
- A basic SOAP configuration file used for the provider pipeline.
- basicsoap11requester.xml
- A basic SOAP configuration file used for the requester pipeline.
- jsonjavaprovider.xml
- A basic JSON configuration file used for the provider pipeline.
CWSProject project configuration
The
CWSProject
template project is configured to use the following settings. All other settings remain set to their respective defaults:
- Output path
- This is set to write generated
build
files to the
loadlib project folder.
- Project dependencies
- Includes the
cpy project subfolder, ensuring that the compiler finds all included copybooks.
- Preprocessor
- Set to build the project using the CICS preprocessor.
- Character set
- Set to use the ASCII character set.
- Dialect
- Set to use the
Micro Focus COBOL dialect.
- Mode
- Sets the mode to word-storage by setting the IBMCOMP compiler directive.
Sequence
Each
Tutorial: CICS Web Service Requester... tutorial requires that you complete its corresponding
Provider... tutorial as a prerequisite. Details are provided as part of the tutorial itself. Otherwise, you may complete these tutorials
in any order. They are not interdependent.