Generating and deploying a web service on CICS®
This topic describes how to generate and deploy a web service on z/OS® CICS®. Aside from setting up the relevant EGL build parts, you must set the following CICS® definitions: TRANSACTION, TCPIPSERVICE, and PIPELINE.
For details about requirements for EGL or web services on z/OS® CICS®, see Special considerations for generating EGL or web services in z/OS® CICS® environments.
Follow these steps to generate and deploy a web service to z/OS® CICS®:
- Create an EGL Service part.
- In an EGL deployment descriptor, add a sharable protocol of the type CICSWS. For keystroke details, see Creating and using a sharable protocol.
- Set the following attributes in the sharable protocol:
- transaction
- The name of a transaction for the web service to run under, with a minimum Transaction Work Area (TWA) of 1024 bytes. You will create this transaction later by copying the CPIH transaction and setting its TWA to 1024 bytes.
- userID
- The user ID the web service will run under (optional).
- On the Web Service Deployment page of the EGL Deployment Descriptor editor, add the Service part to generate it as a web service. For keystroke details, see Adding web service deployment information to the deployment descriptor.
- Set the Protocol field in the deployment descriptor to the CICSWS sharable protocol.
- Set the URI field in the deployment descriptor
to the relative path to which you want to deploy the service. The
default is
/services/ServicePartName, where ServicePartName is the name of the Service part. - In the project's build descriptor, set the following build descriptor
options:
- deploymentDescriptor
- The name of the EGL deployment descriptor to which you added the sharable protocol and the Service part.
- destDirectory
- The root HFS directory containing folders that will receive the
generated web services binding file and WSDL file. An example destDirectory value
is
/u/username/clients. CICS® must have permission to read and write to this directory.The web services binding file is necessary to convert SOAP messages to COBOL at run time.
- destHost
- Specify the name or numeric TCP/IP address of the target system where the build server resides.
- destPassword
- Specifies the password that EGL uses to log on to the remote build server where your output will be prepared for deployment.
- destPort
- Specify the port on which a remote build server is listening for build requests.
- destUserID
- Specifies the user ID that EGL uses to log on to the remote build server where preparation occurs.
- genDirectory
- Specifies the fully qualified path of the directory into which EGL places generated output, control files, and results files.
- prep
- Set prep to YES.
- serverType
- Set serverType to CICS3.1.
- system
- Set system to ZOSCICS.
- Generate both the Service part. You can generate or deploy the deployment descriptor, as described in Introduction to EGL generation and deployment.
- On the CICS® system, define
a web service TRANSACTION with the name you specified in the CICSWS
sharable protocol:
- Make a copy of the CPIH transaction with a command like the following:
Use the name of the transaction for newName and the name of the group for group.CEDA COPY TRANSACTION(CPIH) GROUP(DFHPIPE) AS(newName) TO(group) - Edit the copy of the transaction and set the TWA size to 1024 bytes.
- Make a copy of the CPIH transaction with a command like the following:
- Define a TCPIPSERVICE:
- Create a new TCPIPSERVICE with a command like the following:
Use the name of the new TCPIPSERVICE for name and the name of the group for group.CEDA DEF TCPIPSERVICE(name) GROUP(group) - Set the Portnumber field to a number between 2001 and 65535.
- Create a new TCPIPSERVICE with a command like the following:
- Define a web service PIPELINE:
- If you need to create a new PIPELINE for services, use the following
command:
Use the name of the new PIPELINE for name and the name of the group for group.CEDA DEF PIPELINE(name) GROUP(group) - Set the Configfile field to
/u/cicsts31/pipelines/basicsoap11provider.xml. - Set the Shelf field to
destDirectory/provider/shelf, where destDirectory is the value you used for the destDirectory build descriptor option. - Set the Wsdir field to
destDirectory/provider, where destDirectory is the value you used for the destDirectory build descriptor option.
- If you need to create a new PIPELINE for services, use the following
command:
- Install the group with the following command:
Use the name of the group for group.CEDA INSTALL GROUP(group)