Previous Topic Next topic Print topic


Deploy the Web Service under Enterprise Server

In this topic, you use Net Express to deploy the COBOL Web service supplied with the Net ExpressWebService demonstration to Enterprise Server and generate a client for it.

This is an outline of the steps you perform:

  1. Open the Net Express project supplied with the WebService demonstration.
  2. Configure the project to use your enterprise server, WEBDEMO.
  3. Open the supplied Web service and specify deployment settings for it.
  4. Deploy the Web service to Enterprise Server.
  5. Generate a client for the Web service.

Open the Supplied Net Express Project

To open the Net Express project supplied with the WebService demonstration:

  1. Navigate to the \Examples\Net Express IDE\WebService folder in the installation of your COBOL development system.
  2. Start webservice.app.
  3. Click Yes in the dialog that appears to start using the project directory.

The project opens displaying two windows - the Project window showing the COBOL source program, calculator.cbl, and the Service Interfaces window showing the Web service, CalculatorDemo, supplied with the demonstration.

Expand CalculatorDemo in tree view, to see that it consists of a single one operation, Add.

Configure the Project to Use Enterprise Server

To configure the project to use an enterprise server:

  1. Choose Project > Properties.
  2. Under Enterprise Server, select Project uses an enterprise server.
  3. Click the corresponding Browse button.
  4. In the Enterprise Servers window, click Refresh.
  5. Choose WEBDEMO from the drop-down list.
  6. Click OK twice.

Build the Project

To build the project:

  1. Click Build > Rebuild.

The application .dll and .idy files are created in the output Debug folder in your project directory.

Specify Settings for the Web Service

  1. In the Service Interfaces window, right-click CalculatorDemo.
  2. Click Settings.
  3. Click OK.
  4. On the Mapping Properties dialog, notice the name of your service, http://tempuri.org/CalculatorDemo.
  5. On the Deployment Server tab, click Change next to Enterprise server name.
  6. Select WEBDEMO.
  7. Click OK.
  8. Click Advanced.

    Notice the default namespace, http://tempuri.org/, which is used to define the service.

  9. In the Endpoint URL section, type the relevant address and port for Web Services of your WEBDEMO enterprise server using the following format: http://IPAddress:Port.
  10. Click OK.
  11. Click the Application Files tab.
  12. Click Legacy application needs deploying.
  13. Click Add files.
  14. Open the Debug folder in your project directory.
  15. Select the calculator.int and calculator.idy files.
  16. Click Add.
  17. Click OK twice.

Deploy the Web Service

Now that you have created and configured a project for the Web service, you can deploy it as follows:

  1. In the Service Interfaces window, right-click CalculatorDemo.
  2. Select Deploy.

    In the Deployment progress window, you can see when your Web service is deployed.

To see the Web service deployed to WEBDEMO:

  1. In Visual Studio, open Enterprise Server Administration.
  2. On the row corresponding to WEBDEMO, click Details in the Status column.
  3. Make sure Server > Control tabs are selected.
  4. Click ES Monitor & Control.
  5. Click Services in the left-hand bar.

    The Services page shows the Web service that you deployed, http://tempuri.org/CalculatorDemo#Add, where Add is the operation for this service.

Generate Client

To generate a client for the Web service:

  1. In Net Express, click calculator.int in the Project window.
  2. Choose Service > Generate Client > using WSDL.
  3. In the dialog that appears, click Browse next to the WSDL name field.
  4. Browse to the ..\webservice\REPOS\Calculator.deploy subfolder in your Net Express project directory.
  5. Select the .wsdl file.
  6. Click Open > Next > Use current Net Express project > Next > Finish.

    The client, CalculatorDemo-app.cbl, has been added to the Project window.

  7. Rebuild the project.
Previous Topic Next topic Print topic