Deploy the MakeCheckAppt Web Service

Guides you through the steps required to prepare the ProgramREST project and MakeCheckAppt Web service for deployment, deploy the Web service to the ESREST enterprise server, and verify the deployment results.

Work through the following sections to prepare your project and Web service for deployment, and to deploy and verify.

Build the ProgramREST project

You need to build the ProgramREST project to generate all required deployment files.

  • On the Solution Explorer, right-click the ProgramREST project; then click Build.

Set deployment properties

To successfully deploy a REST Web service to an enterprise server instance, you need to first set some options that tell Visual COBOL where to find certain files.

  1. From the Solution Explorer, right-click the MakeCheckAppt service interface; then click Properties.
  2. Ensure that the interface type property is set to JSON Web Service (default).
  3. Click the Application files to deploy field, and then click its corresponding browse button Browse button.
  4. On the Add/Remove Items dialog box, click Add File.
  5. Browse to your project's ProgramREST folder, and select the following files:
    • appoint.dat
    • consultants.dat
    • customers.dat

    These are the data files accessed by the service.

  6. Click Open.
  7. Click Add File again, and browse to your project's ProgramREST\bin\x86\Debug folder.
  8. Select schedule.dll, and then click Open.

    This is the executable file you need to debug the service.

  9. Click OK to close the Add/Remove Items dialog box.

Associate the ESREST enterprise server instance

You need to associate the ESREST enterprise server instance with your ProgramREST project:

  1. From the Server Explorer, expand localhost under Micro Focus Servers to see a list of available enterprise server instances.
    Note: If ESREST does not appear on the list, right-click Micro Focus Servers and select Refresh from the context menu.
  2. Right-click ESREST; then click Associate with Project > ProgramREST.

Stop enterprise server instances

To ensure that your enterprise server instance does not encounter any port conflicts with other enterprise server instances that use the same listener port, stop all started enterprise server instances, if any, as follows:

  1. On the Server Explorer, expand Default under Micro Focus Servers to see a list of enterprise server instances.
  2. Right-click each started enterprise server instance, and stop it by selecting Stop from the context menu.
    Note: Started enterprise server instances show with a green icon Started enterprise server instance.

Start the ESREST enterprise server instance

Before deploying your service interface, you must start the ESREST instance where the MakeCheckAppt service will run.

  • From the Server Explorer, right-click ESREST; then select Start from the context menu.

    After the list on the Server Explorer refreshes, the ESREST entry appears with a green icon Started enterprise server instance, indicating that it is started.

Deploy the MakeCheckAppt Web service

  • From the Solution Explorer, right-click the MakeCheckAppt service interface; then click Deploy.

The Output window shows the progression of the deployment process. If deployment was successful, you should see a message: Deployment completed with warnings. If you scroll up to see the log output, notice that the deployment process changed the direction of the slashes in some directory specifications. This is normal behavior for successful deployment.

If deployment ever fails, you should find a message in the Output window indicating why it failed. Also, the failure message contains the path to the deployment log file. You can type the address into a browser and view the log file from there.

View deployment results

Now that your REST Web service is deployed, you can look at its details in ESCWA.

  1. In ESCWA, click Native.
  2. In the navigation pane, expand Directory Servers > Default, and double-click your enterprise server instance.
  3. Click General > Services.

    This takes you to the Services page.

    At the bottom of the right pane, you should see both operations marked as Available. This means that the service is ready to be accessed by a client.

  4. Close ESCWA.