Set Up the JSONREQ Enterprise Server Region

Guides you through the process of creating the JSONREQ enterprise server region, and configuring JSONREQ resources, and installing and verifying those resources.

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.

Create an enterprise server region

Here you use the Server Explorer to create an enterprise server region on which to run the requester Web service.

  1. On the Server Explorer, right-click Local [localhost:86]; then select New > Enterprise Server.
  2. In the Name field, type JSONREQ.
  3. Click the Browse button that corresponds to the Template field, and navigate to the CICSWebServicesTemplate.xml file located in the InvokeReverseJSON project folder.
  4. Double-click CICSWebServicesTemplate.xml.
  5. On the list next to Associate with projects, check InvokeReverseJSON.
  6. Click Finish.

    The Server Explorer should now show the JSONREQ enterprise server region listed under Local [localhost:86].

Configure JSONREQ resources

Start the JSONREQ enterprise server region
  1. On the Server Explorer, right-click JSONREQ; then select Start.
    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. If a Secure Storage prompt appears, click No.
Start Enterprise Server Administration
  • On the Server Explorer, right-click Local [localhost:86] and then click Open Administration Page.

    The Enterprise Server Administration Home page starts in an Eclipse window.

Start ES Monitor and Control (ESMAC)
  1. After JSONREQ has started, on the Enterprise Server Administration Home page, click the Details button located in the Status column for the JSONREQ region.
  2. On the Server > Control page, click ES Monitor & Control.
Open the DEMOSTRT startup list
  1. On the ESMAC menu, click the drop-down list located under Resources; then select by Group.
  2. Click Startup.
  3. Click the Details button that corresponds to DEMOSTRT.
Add resource groups
As with the JSONPROV enterprise server region, the JSONREQ region requires the DFHWEB and DFHPIPE resource groups, and a resource group to contain the requester resources Here, you add these resource groups to the startup list.
  1. On the CICS STARTUP - DEMOSTRT page, scroll down to the end of the list and type DFHWEB into the empty field at the bottom; then click Apply. ESMAC adds the DFHWEB group, and adds another empty field at the end of the list.
  2. In the new empty field, type DFHPIPE; then click Apply.
  3. In the new empty field, type JSONREQ; then click Apply.
Create the JSONREQ resource group
  1. On the ESMAC menu, click the Groups button located under Resources.
  2. On the CICS Resource Groups page, click New.
  3. In the Name field, type JSONREQ.
  4. In the Description field, type CICS Web Services JSON Requester Resources; then click Add.
Create resources
The invkRevJ program requires a URIMap resource, a pair of Bundle resources, and a PCT resource used to invoke the Reverse Web service from the Rumba+ TN3270 terminal emulator.
Add URIMap
  1. On the CICS Group JSONREQ page, click URIMap.
    Important: If the Pipeline button is not present, check to be sure that you have properly installed the CCSID tables specified in the Tutorials: CICS Web Services topic.
  2. Complete these fields:
    Name REVRSURI
    Description URIMAP for JSON reverseJ request
    Usage Client
    Port 5482
    Host localhost
    Path /cics/services/json/reverse
  3. Click Add; then click Apply.
  4. Click Group List to return to the CICS Group JSONREQ page.
Add Bundles
  1. Click Bundle.
  2. Complete these fields:
    Name REQBNDL
    Description Input bundle to map the data structure to a JSON request
    Bundle Dir $IDE_BUNDLE_LOC\REQBNDL
  3. Click Add; then click Apply.
  4. Click Group List to return to the CICS Group JSONREQ page.
  5. Click Bundle.
  6. Complete these fields:
    Name RESPBNDL
    Description Output bundle to map the JSON response to a data structure
    Bundle Dir $IDE_BUNDLE_LOC\RESPBNDL
  7. Click Add; then click Apply.
  8. Click Group List to return to the CICS Group JSONREQ page.
Add PCT
  1. Click PCT.
  2. Complete these fields:
    Name INVJ
    Description CWS transaction to invoke the reverse service
    Program Name invkRevJ
  3. Click Add; then click Apply.
  4. To return to the Administration Home page, click Home at the top of the ESMAC menu.

Install JSONREQ resources

You can install the new resources by stopping and starting the region.

  • From the Server Explorer in Eclipse , right-click JSONREQ; then select Restart. This stops and then starts the JSONREQ enterprise server region, automatically installing and loading the newly added resources on the startup list.

Verify Resources

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

  1. From the Enterprise Server Administration Home page, start ESMAC for the JSONREQ region, just as you did in the previous section.
  2. On the ESMAC menu, select Active from the drop-down list located under Resources.
  3. On the ESMAC menu, click the WebSvc button. You should see the ReverseJ Web service listed and marked as INSERVICE.
  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/json/reverse.

    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.