This topic describes the development steps
that you need to perform to create the needed artifacts to install
a new Web service in CICS® using the Enterprise Service
Tools perspective.
This process uses the Create New Service Interface
(bottom-up) wizard from the Enterprise Service Tools.
Note: You can also achieve these tasks using the Batch Processor
(See
Batch processor).
Locating the CICS application
source and copy books
In order to generate the artifacts
needed to enable an application as a Web service, the Create
New Service Interface (bottom-up) wizard must have access to
either a complete program or copy book containing the language structure
that is the interface to the application.
Since generated
artifacts (the XML converters, the driver, the WSBind file, and the
WSDL file) must be transferred to a z/OS® system,
you can use the z/OS projects and system perspectives of the IBM® Rational® Developer
for System z® to assist with this task. Also
if your program source and copy books are located on z/OS you
can access them using the z/OS projects perspective. For
more information on z/OS perspectives and projects
see Systems, projects, and properties
Create
a local project and import the program source files for the CICS program
to the project. If the program source files exist on a remote system,
use the Remote Systems view to copy them to your local project.
Generating the Web services
artifacts conversion artifacts
Follow these steps to generate
the Web services artifacts:
- Verify that the Navigator view is open. If the Navigator view
is not open, follow these steps to open the Navigator view:
- In the menu bar of the workbench, select . The Show View wizard opens.
- In the Show View wizard:
- Expand General.
- Select Navigator.
- Click OK.
The Navigator view opens.
- Start the Enterprise Service Tools Wizard Launchpad:
- In the Navigator view, right-click the program source file containing
the interface data structure for the program.
- Select Enable Enterprise Web Service.
The Enterprise Service Tools Wizard Launchpad opens.
- Launch the Create New Service Interface (bottom-up) wizard:
- In the Enterprise Service Tools Wizard Launchpad:
- In the Runtime list box, select Web
Services for CICS.
- In the Scenario list box, select Create
New Service Interface (bottom-up).
- In the Conversion type list box, select Compiled
XML Conversion.
- Click Start.
The Create New Service Interface (bottom-up) wizard opens.
- On the first page of the wizard (entitled Language
Structures):
- In the Request Language Structure tab,
select the high-level language structure that is the input structure
for the application. By default the first structure defined in the
program source file is selected.
- In the Response Language Structure tab,
select the high-level language structure that is the output structure
for the application. Additional structures are allowed
to be selected or omitted. However, by default the first structure
defined in the program source file is selected.
- Click Next.
- On the second page of the wizard (entitled Generation
Options):
- In the XML Converters tab:
- In the Specify identification attributes group,
verify or change other entries that apply for your z/OS system
(for example, the name of the CICS application program in "Service
program name:" should be correct).
- In the Specify character encodings group,
verify or change other entries that apply for your z/OS system.
- In the WSDL and XSD tab:
- In the Service Location field, type the
Endpoint URI.
Note: The local portion of the URI (excludes server and
port) is used as the default for the local URI in the WSBind (for
example, /exampleApp/inquireSingle).
- Click Next.
- On the third page of the wizard (entitled Web Services
for CICS):
- In the Basic Options tab:
- In the Specify targets for WSBind file group:
- In the input field WSBind file container,
specify the folder and subfolder in which you want the WSBind file
to be generated.
- In the Specify application program properties group,
if your CICS program communicates via a channel.
- Expand the Program interface list box and
select CHANNEL.
- In the Container name field, type the name
of the container.
- In the Advanced Options tab, specify installation
options for the CICS Web service. If you do not specify these
properties you might have to define them at install time during the
manual creation of the Web service definitions in CICS.
- Click Next.
- On the fourth page of the wizard (titled File, data
set, or member selection):
- In the XML Converters tab:
- In the Converter file container field,
specify the folder and subfolder in which you want the converter programs
to be created.
- In the input field Converter driver file name,
type the name of the file in which you want the converter programs
to be generated.
Note: By default, all the converter programs (driver, request converter, and response converter)
are placed in the same file. If you clear the check box Generate
all to driver, you can specify a different file to contain
each converter program, or you can clear the check box that precedes
a converter program's name to cause the wizard not to generate that
converter program.
- In the WSDL and XSD tab:
- In the WSDL file container field, specify
the folder and subfolder in which you want the WSDL and XSD files
to be generated.
- In each of the input fields WSDL file name, Request XSD file name, and Request XSD file name, type the name that
you want to use for the file. Clear the check box that precedes the request XSD file name or the response XSD
file name to cause the wizard not to generate that file.
- Click Finish.
The Create New Service Interface (bottom-up) wizard
generates the specified output.
Building the XML converters
The XML converters
consist of multiple programs that must be compiled and statically
linked together with the converter driver program as the main entry
point. Using the z/OS projects perspective create a remote project
that refers to the target system for your Web service. In order to
build the XML converters, a version of Enterprise COBOL that supports
XML parsing (version 3.1 or later) is required. Copy the XML converter
files to a remote z/OS system, using the Remote Systems
view in the z/OS Projects perspective (or, you can generate
the files directly to the remote system from within the Enable
Enterprise Web Service wizards). Browse for the XML Converter
files in the Remote Systems view and add them to the remote project.
Edit the properties of the remote project to reflect the compile and
link options specific to your z/OS system account. The target
load library for the remote project should be in the DFHRPL concatenation
of the target CICS region. When the converter
programs are generated into separate files, nominate the converter
driver as the main entry point and right click on the remote
project to bring up the context menu. Select rebuild project from
the menu. The results of the build, including the compilation listings,
will appear in the remote project.