Update the JSONPROV Enterprise Server Region

Walks you through the steps required to update the JSONPROV enterprise server region to run the loanPaym Web service.

Configure the enterprise server region

This tutorial uses the JSONPROV enterprise server region created in Tutorial: CICS Web Service Provider from JSON, Top-down Method to run the Web service provider.

Do one of the following:

  • If you did not complete Tutorial: CICS Web Service Provider, JSON Request-Response Top-down Method:
    1. Open the Set Up the JSONPROV Enterprise Server Region topic.
    2. Complete the sections titled Create the JSONPROV enterprise server region and Configure JSONPROV resources. However, when selecting a project with which to associate the new region, check the LoanDemoJSON project instead of the ReverseJSON project.
    3. From that point, proceed directly to the Verify Resources section later in this topic.
  • If you did complete Tutorial: CICS Web Service Provider, JSON Request-Response Top-down Method, then you created and configured JSONPROV at that time. In this case, perform the steps presented in this section before moving on to the Verify resources section.
Update the dfhdrdat file
When you create an enterprise server region from the Server Explorer, it stores some configuration information in the project's system\dfhdrdat file. Therefore, to update the LoanDemoJSON project with this information, you can copy the file from the ReverseJSON project to the LoanDemoJSON project:
  1. On the Application Explorer view, expand the ReverseJSON project and system folder.
  2. Right-click dfhrdat, and select Copy from the context menu.
  3. On the Application Explorer view, expand the LoanDemoJSON project and system folder.
  4. Right-click dfhrdat, and select Paste from the context menu.
  5. Answer Yes to the prompt to overwrite the existing file.
Start the Server Explorer
The Server Explorer view is visible by default when using the Team Developer perspective, and appears as a tab on the same level as the Application Explorer view. However, if it is not visible:
  • In Eclipse, click Window > Show View > Other > Micro Focus > Server Explorer, and then click Open.
Attention: You might encounter an ESCWA Sign On dialog box as you perform the steps required to create, configure, start, or stop an enterprise server instance from the Server Explorer. If you do, ensure that the Server requires credentials, Use specific server credentials, or Server is secured , and the Store credentials boxes are unchecked, and then click OK. If asked to provide a password, enter your UNIX logon password.
Associate the LoanDemoJSON project
In previous tutorials, you have associated your project with an enterprise server region as part of the steps to create the region. Because the region you are using here was previously associated with the ReverseJSON project, you need to change the association to the LoanDemoJSON project.
  1. On the Server Explorer, right-click JSONPROV; then select Associate with project.
  2. If a check mark appears next to ReverseJSON, click it to remove the association.
  3. Again, right-click JSONPROV; then select Associate with project.
  4. Click LoanDemoJSON to create an association.
  5. If you are prompted to restart the server, answer Yes; if you are not prompted, right-click JSONPROV and select Start from the context menu.

Verify resources

After JSONPROV is started, you can verify that the resources you have defined are installed and active.

Start Enterprise Server Common Web Administration (ESCWA)
  • On the Server Explorer, right-click Default [127.0.0.1:86] and then click Open Administration Page.

    ESCWA starts in your default browser.

Access the CICS resource settings for the server
  1. After JSONPROV has started, select it from the default Directory Servers list in ESCWA.
  2. At the top of the right pane, open the drop-down menu next to CICS.
View defined resources
  1. From the CICS drop-down list in the right pane, select Active under Resources.
  2. On the resulting list of active resources in the left pane, click WebSvc. You should see the loanPaym Web service listed and marked as INSERVICE.
  3. On the list, click Pipeline > JSONPIPE. You should see that the JSONPIPE pipeline is enabled.
  4. On the list, click URIMap > £map-ref, where map-ref is an alphanumeric string generated by Enterprise Server. You should see the path specified as /cics/services/json/loanpaym.

    Enterprise Server generates URIMAPs to provide CICS with the information it needs to process requests. The name of each generated URIMAP begins with a pounds-sterling symbol (£).

    To run your provider CICS Web service, you send a JSON request to an endpoint URL that routes the request to your enterprise server region. The endpoint URL contains a URI value. The incoming request reads the installed URIMaps to identify the map whose Path value matches the URI value of the endpoint URL. When the correct URIMAP is identified, CICS uses the data defined in the URIMap, such as the name of the Web Service and its associated Pipeline, to process the request.

  5. Close ESCWA.