Update the CWSJSON Enterprise Server Region

Walks you through the steps required to update the CWSJSON enterprise server region to run the LOANPAYM Web service.

Configure the enterprise server region

This tutorial uses the CWSJSON 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 CWSJSON Enterprise Server Region topic.
    2. Complete the sections titled Create the CWSJSON enterprise server region and Configure CWSJSON resources. However, when selecting a project with which to associate the new region, check the LoanJSON 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 CWSJSON 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 LoanJSON project with this information, you can copy the file from the ReverseJSON project to the LoanJSON project:
  • Using Windows File Explorer or at a command prompt, copy the dfhdrdat file located in the ReverseJSON project's system directory to the LoanJSON project's system directory, overwriting the existing file.
Associate the LoanJSON 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 LoanJSON project.
  1. On the Server Explorer, right-click CWSJSON; then select Associate with project.
  2. If a check mark appears next to ReverseJSON, click it to remove the association.
  3. Again, right-click CWSJSON; then select Associate with project.
  4. Click LoanJSON to create an association.
  5. If you are prompted to restart the server, answer Yes; if you are not prompted, right-click CWSJSON and select Start from the context menu.

Verify resources

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

Start Enterprise Server Administration
  • On the Server Explorer, right-click Micro Focus Servers, and then click Administration.

    The Enterprise Server Administration Home page starts in a Visual Studio window.

Start ES Monitor and Control (ESMAC)
  1. On the Enterprise Server Administration Home page, click the Details button located in the Status column for the CWSJSON region.
  2. On the Server > Control page, click ES Monitor & Control. This starts the ESMAC utility where you can view the defined resources.
View defined resources
  1. On the ESMAC menu, select Active from the drop-down list located under Resources.
  2. Click the WebSvc button. You should see the LOANPAYM Web service listed and marked as INSERVICE.
  3. Click the Details button that corresponds to the LOANPAYM Web service.

    Notice the value for WSBIND. This is determined by the information stored in your project.

  4. On the ESMAC menu, click Pipeline; then click the Details button that corresponds to JSONPIPE. The Pipeline resource sets the response wait period, identifies the JSON configuration file, and the Web service directory.
  5. On the ESMAC menu, click URIMap; then click the Details button that corresponds to PIPELINE and /cics/services/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.

  6. Close Enterprise Server Administration.