To successfully deploy a REST service interface to an enterprise server instance, you need to first set some options in Visual COBOL.
You need to build the project to generate all required deployment files.
To ensure that the deployment process runs smoothly, you must set some options that tell Visual COBOL where to find certain files.
to add the following files:
These files are copied to the enterprise server when you deploy.
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 as follows:
Before deploying your service interface, you must start the ESREST instance where the ProgramREST service will run.
The Enterprise Server Console Daemon is then invoked, starting the ESREST enterprise server instance.
You need to generate a .dll executable file from your project to deploy with your service interface. This is necessary so that you can debug the service after generating a client.
The Output window shows the progression of the deployment process. If deployment was successful, you should see a message indicating success.
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.
Now that your service interface has been deployed as a service running on the ESREST enterprise server, you can look at the details of the deployed service via the Enterprise Server Administration page.
In the row showing information for the ESREST enterprise server, you should see that the Objects column shows the number of services that this enterprise server instance runs. In this case, the number of running services should be at least 4. These are the two that come standard with the enterprise server, plus the one service you added containing two operations. You might see more if you have deployed other services to the ESREST enterprise server.
In the row showing your new service, ProgramREST, you'll notice that the Current Status column shows both operations as Available. This means that the service is ready to be accessed by a client.