Generate loanPaym Web Service Components

Provides step-by-step instructions to generate all required components of the loanPaym Web service from the LoanDemo project.

Use the New CICS Web Service wizard to generate the components of your Web service.

  1. From the Application Explorer view, click the LoanDemo project to select it.
  2. From the Eclipse main menu, click File > New > CICS Web Service. This starts the New CICS Web Service Wizard.
    Note: If CICS Web Service is not listed, select Other, expand Micro Focus Service Interface, select CICS Web Service, and click Next.
  3. Click XML message processing.
  4. From the Service type drop-down list, select CICS Web Service (Bottom-Up); then click Next.

    The Project field should already show the LoanDemo project name.

  5. Click the Browse button that corresponds to the Program location field, and navigate to the loanPaym.cbl file located in the cbl project folder.
  6. Double-click loanPaym.cbl. This populates the Program location field, and populates the Program name field with loanPaym, which is the name defined in the program.
  7. In the Service location field, type:

    http://localhost:5482/cics/services/loanpaym

    This is the endpoint URL that you use to invoke the Web service. It specifies the server, port, and a URI used to identify the Web service in Enterprise Server.

    The loanPaym program contains a COMMAREA interface; therefore, you can accept the default setting in the Program Interface field.

  8. Click Next.

    By default, the wizard assigns an operation name that consists of the program name followed immediately by Operation.

    The request and response structures for your Web service are contained in the LoanDemo project's two copybooks.

  9. Click the Browse button that corresponds to the Request structure field, and browse to the cpy project folder.
  10. Select LOANINP.cpy; then click OK.
  11. Repeat the process in the previous two steps to add the LOANOUT.cpy copybook to the Response structure field.
  12. Click Finish.

In your LoanDemo project, you should now see an entry for Web Services > loanPaym > loanPaymOperation.

The loadlib project folder should now contain the following generated files:

loanPaym.wsbind
A bind file that maps the SOAP request to the data structure in LOANIN.cpy, and maps the data structure in LOANOUT.cpy to the SOAP response message.
loanPaym.wsdl
The Web service definition file that describes the loanPaym application.