Using WD/z to generate WSDL IBM-CICS

As part of the functionality in WD/z V7 for developing z/OS applications and Web services are the Enterprise Service Tools for Web services and SOAP. Within this functionality is the Web services for CICS wizard that provides the functionality similar to that of the DFHLS2WS utility.

The example we are going to use is to generate the business logic in program ITSOCA03 using the COBOL copy book called ITSOCACD, which provides the data structure for our business logic for Listing Corporate Acknowledgements.

Unlike our other data structures, this structure represents a CONTAINER rather than a COMMAREA.

The following steps demonstrate the generation of wsdl and wsbind files from our developed COBOL copy book data structure.

1. Importing the COBOL copy book

Use the following steps to import the copy book member from the z/OS remote system into a local project in the Navigator view:

  1. Verify that the Navigator view is open.
  2. Use Window → Show View → Other, and expand General.
  3. Select Navigator.
  4. If you do not have a local project, create one using File → New → Project and expand General.
  5. Select Project.
  6. Drag and drop or import the copybook from the PDS containing the member in the Remote Systems view of the host into the local project

2. Running the Web Services for CICS wizard

  1. Right-click the copy book in the Navigator view, and select Enable Enterprise Web Service.This is shown in Figure
  2. Select the copy book to generate Web Service artifacts

    Select the copy book to generate Web Service artifacts

  3. This starts the Enterprise Service Tools wizard as in Figure .
  4. Check that the following are selected:

    • Runtime: Web Services for CICS
    • Scenario: Create New Service Interface (bottom-up)
    • Conversion type: Interpretive XML conversion

    Using the bottom-up scenario with Interpretive XML conversion generates files to implement a Web service provider for the Web services CICS environment. Interpretive XML conversion is supported only for the Web services for CICS runtime environment.

  5. Click Start. This starts up the Web Services for CICS wizard as in Figure. This wizard performs functionality similar to that of the DFHLS2WS utility in the CICS Web Services Assistant.
  6. The Enterprise Service Tools Wizard Launchpad

    The Enterprise Service Tools Wizard Launchpad

  7. On the Application properties tab, specify the following options:
    • Program name: The name of the CICS application program that is to be exposed as a Web service.
    • Program Interface: Specifies that CICS passes data to the application program by way of a channel, rather than a COMMAREA.
    • Container name: Specifies the name of the container that holds the high level data structure.
  8. Specify the CONTAINER name

    Specify the CONTAINER name

  9. On the Service Properties tab specify the following options, as seen in Figure.
    • Inbound language structure: Specifies the high-level structure for the Web service request—in this case it is CONTAINER-DATA.
    • Outbound language structure: Specifies the high-level structure for the Web service response—in this case it is CONTAINER-DATA.
    • Service Location: Specifies the location of the Web service on the host.
  10. Specify CONTAINER-DATA as the language structure

    Specify CONTAINER-DATA as the language structure

  11. Click Next.
  12. The panel displayed in Figure allows you to specify the target names of the generated artifacts. By default the target location is the local file system. You can also specify the remote UNIX System Services file path name if you want to generate these directly into the remote host by browsing the file container for the appropriate file.
  13. We also specify that the target program communicates via a channel, and we name the expected CONTAINER.

  14. Click Next.
  15. WSBind and WSDL file target names

    WSBind and WSDL file target names

  16. Click Finish.

The generated artifacts can now be seen in the Explorer view of the local project.

The generated Web service artifacts

The generated Web service artifacts

3. Creating the CICS resources

We generated the Web service wsdl and bind files. In this example we wrote the generated files to a local project on the workstation, so in order for CICS to dynamically create the WEBSERVICE and URIMAP resources, we need to copy the .wsdl and .wsbind files to our pickup directory for our PIPELINE in the UNIX System Services HFS.

To do this we performed a drag and drop of the two files CorpAck.wsbind and CorpAck.wsdl to the HFS directory: u/jnott/cicswsap/wsbind/provider.

Now we can scan the pipeline to dynamically create the CICS resources by issuing the following CICS command:

CEMT PERFORM PIPELINE(EXPIPE01) SCAN

This command detects the new bindings file in the pickup directory, copies it to the shelf directory for this CICS region, and dynamically creates the WEBSERVICE and URIMAP resources.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM-CICS Topics