Guides you through the steps required to deploy the CarTracker Web service to the ESRSTAPI enterprise server, and verify the
deployment results.
Associate the ESRSTAPI
enterprise server instance
You need to associate the ESRSTAPI
enterprise server instance with your ProgramRESTAPI project:
- From the
COBOL Explorer, expand
ProgramRESTAPI > Web Services
- Right-click the
CarTracker Web service; then select
Properties from the context menu.
- On the
Deployment Server tab, click the
Change button that corresponds to the
Enterprise Server name field.
- In the
Server column, click
ESRSTAPI,and then click
OK.
Select application files to deploy
- Still on the
Properties page, click the
Application Files
tab.
- Select
Legacy application needs deploying.
- Click
Add Files.
- In the
File Selection dialog box, navigate to your project
loadlib directory.
- Select the
cars.xml, the
CarsProgram.dll and the
CarsProgram.xml files, and then click
Open.
- On the
Properties page, click
OK.
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:
- On the
Server Explorer, expand
Local [localhost:10086] > Default [127.0.0.1:86]
to see a list of
enterprise server instances.
- 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
.
Start the ESRSTAPI
enterprise server instance
Before deploying your service interface, you must start the ESRSTAPI instance where the CarTracker service will run.
- From the
Server Explorer, right-click
ESRSTAPI; then select
Start from the context menu.
After the server starts, the
Server Explorer refreshes, and the
ESRSTAPI entry appears with a green icon
, indicating that it is started.
Deploy the CarTracker Web service
- From the
COBOL Explorer, right-click the
CarTracker Web service, and then click
Deploy.
- In Eclipse, click the
Console tab.
- On the icon bar, click the down arrow associated with
Display Selected Console
.
- Click
Service Interfaces Console to monitor deployment progress.
If deployment ever fails, you should find a message in the
Service Interfaces Console 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 RESTful Web service is deployed, you can look at its details in ESCWA.
- In
ESCWA click
Native.
- In the
ESCWA navigation pane, expand
Directory Servers > Default, and then select
ESRSTAPI.
Note: If you have followed this tutorial up to this point without using ESCWA for another purpose, it should already be in the configuration
described in steps
1 and
2.
- On the
General drop-down list, select
Services.
In the rows under your new service,
CarTracker, you should see that the
Last Status column shows all three operations as
Available. This means that the service is ready to be accessed by a client.
In addition, the name of the service and the
Package columns for all operations display
/temppath/CarTracker/1.0. This is the base URI used to identify the Web service in
Enterprise Server. In a JSON request, the base URI, combined with the path specification for a particular operation, identifies which operation
to launch. See
Operation Paths for more information.