Guides you through the steps required to build the project, set deployment properties, associate an
enterprise server instance with your project, deploy the service interface, and verify the deployment results.
To successfully deploy a service interface to an
enterprise server instance, you need to first set some options in
Visual COBOL.
Build the ProgramCORS project
You need to build the project to generate all required deployment files.
- On the
Solution Explorer, right-click the
ProgramCORS 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.
- From the Solution Explorer, right-click the
AccessBooks service interface; then click
Properties.
- Ensure that the
interface type property is set to
JSON Web Service (default).
- Click the
Application files to deploy field, and then click its corresponding browse button
.
- On the
Add/Remove Items dialog box, click
Add File.
- Browse to your project's
ProgramCORS folder, and select the following files:
- bookfile.dat
- bookfile.idx
These are the data files accessed by the service.
- Click
Open.
- Click
Add File again, and browse to your project's
ProgramCORS\bin\x86\Debug folder.
- Select
book.dll, and then click
Open.
This is the executable file you need to debug the service
- Click
OK to close the
Add/Remove Items dialog box.
Associate the ESCORS
enterprise server instance
You need to associate the ESCORS
enterprise server instance with your
ProgramCORS project:
- From the
Server Explorer, expand
localhost under
Micro Focus Servers to see a list of available
enterprise server instances.
- Right-click
ESCORS; then click
Associate with Project > ProgramCORS.
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
localhost
under
Micro Focus Servers 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 ESCORS
enterprise server instance
Before deploying your service interface, you must start the ESCORS instance where the AccessBooks service will run.
- From the
Server Explorer, right-click
ESCORS; then select
Start from the context menu.
Note: If this is the first time you have started the server, you see a sign-on dialog box. If
Server is secured is checked, uncheck it; then click
OK. Unchecking
Server is secured prevents this dialog box from showing when you subsequently start the region. If
Server is secured is not checked, simply click
OK to clear the dialog box. Also,
if prompted to disable password recovery, click
No.
After the list on the
Server Explorer refreshes, the ESCORS entry appears with a green icon
, indicating that it is started.
Deploy the AccessBooks Web service
- From the
Solution Explorer, right-click the
AccessBooks 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.
- In
ESCWA click
NATIVE.
- In the
ESCWA navigation pane, expand
Directory Servers > Default, and then select your
enterprise server instance.
- On the
GENERAL drop-down list, select
Services.
See the row showing under your new service,
AccessBooks - you should see that the
LAST STATUS column shows all four operations as
Available. This means that the service is ready to be accessed by a client.