Creating Web service artifacts for CICS

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 Developer for z/OS 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.

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:
  1. Verify that the Navigator view is open. If the Navigator view is not open, follow these steps to open the Navigator view:
    1. In the menu bar of the workbench, select Window > Show View > Other. The Show View wizard opens.
    2. In the Show View wizard:
      1. Expand General.
      2. Select Navigator.
      3. Click OK.
    The Navigator view opens.
  2. Start the Enterprise Service Tools Wizard Launchpad:
    1. In the Navigator view, right-click the program source file containing the interface data structure for the program.
    2. Select Enable Enterprise Web Service.
    The Enterprise Service Tools Wizard Launchpad opens.
  3. Launch the Create New Service Interface (bottom-up) wizard:
    1. In the Enterprise Service Tools Wizard Launchpad:
      1. In the Runtime list box, select Web Services for CICS.
      2. In the Scenario list box, select Create New Service Interface (bottom-up).
      3. In the Conversion type list box, select Compiled XML Conversion.
      4. Click Start.
      The Create New Service Interface (bottom-up) wizard opens.
  4. On the first page of the wizard (entitled Language Structures):
    1. 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.
    2. 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.
    3. Click Next.
  5. On the second page of the wizard (entitled Generation Options):
    1. In the XML Converters tab:
      1. 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).
      2. In the Specify character encodings group, verify or change other entries that apply for your z/OS system.
    2. In the WSDL and XSD tab:
      1. 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).
    3. Click Next.
  6. On the third page of the wizard (entitled Web Services for CICS):
    1. In the Basic Options tab:
      1. In the Specify targets for WSBind file group:
        1. In the input field WSBind file container, specify the folder and subfolder in which you want the WSBind file to be generated.
      2. In the Specify application program properties group, if your CICS program communicates via a channel.
        1. Expand the Program interface list box and select CHANNEL.
        2. In the Container name field, type the name of the container.
    2. 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.
    3. Click Next.
  7. On the fourth page of the wizard (titled File, data set, or member selection):
    1. In the XML Converters tab:
      1. In the Converter file container field, specify the folder and subfolder in which you want the converter programs to be created.
      2. 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 checkbox Generate all to driver, you can specify a different file to contain each converter program, or you can clear the checkbox that precedes a converter program's name to cause the wizard not to generate that converter program.
    2. In the WSDL and XSD tab:
      1. In the WSDL file container field, specify the folder and subfolder in which you want the WSDL and XSD files to be generated.
      2. 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 checkbox that precedes the request XSD file name or the response XSD file name to cause the wizard not to generate that file.
    3. 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 the remote project to open the menu. Select rebuild project from the menu. The results of the build, including the compilation listings, will appear in the remote project.