Guides you through the process of configuring
CWSJSON resources, and installing and verifying those resources.
Start the Server Explorer
The
Server Explorer expandable ribbon is visible in Visual Studio on the top left side of the IDE by default when using
Enterprise Developer. However, if it is not visible:
- In Visual Studio, click
View > Server Explorer.
Attention: You might encounter an
Enterprise Server 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
box is
unchecked, and then click
OK.
Also, if prompted to disable password recovery, click
No.
Configure CWSJSON resources
To run the invkRevJCICSClientApp Web service requester using the CWSJSON
enterprise server region you created in the previous tutorial, you must add the appropriate resources to the startup list and add and configure additional
resources required by the CICS program.
- Start the CWSJSON
enterprise server region
-
- On the
Server Explorer, right-click
CWSJSON; then select
Start.
- Start
Enterprise Server Common Web Administration (ESCWA)
-
- Access the CICS resource settings for the server
-
- After
CWSJSON has started, select it from the default
Directory Servers list in ESCWA.
- At the top of the right pane, click
CICS > Resources.
- Create the CWSJSONR resource group
-
- On the
RESOURCES page, expand the
Groups node.
- Click
NEW in the
GROUPS pane.
- In the
Name field, type
CWSJSONR.
- In the
Description field, type
CICS Web Services JSON Requester Resources; then click
SAVE. This invokes the
CWSJSONR page where you can create and define resources for the group.
- Define resources
- The invkRevJCICSClientApp 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.
- Define a URIMap resource
-
- On the
CWSJSONR page, click
NEW and then click
URIMap from the drop-down list.
- Complete these fields:
Name
|
reverseR
|
Description
|
My CICS Requester URIMap
|
Usage
|
Client
|
Port
|
5639
|
Host
|
localhost
|
Path
|
/cics/services/reverse
|
- Click
SAVE.
- Click
BACK to return to the
CWSJSONR page.
- Define Bundle resources
-
- On the
CWSJSONR page, click
NEW and then select
Bundle from the drop-down list.
- Complete these fields:
Name
|
INVKRVJI
|
Description
|
Input bundle to map the data structure to a JSON request
|
Bundle Directory
|
$IDE_PROJECT_LOC\invkRevJCICSClientApp\invkRevJInBundle
|
- Click
SAVE.
- Click
BACK to return to the
CWSJSONR page.
- Click
NEW and then select
Bundle from the drop-down list.
- Complete these fields:
Name
|
INVKRVJO
|
Description
|
Output bundle to map the JSON response to a data structure
|
Bundle Directory
|
$IDE_PROJECT_LOC\invkRevJCICSClientApp\invkRevJOutBundle
|
- Click
SAVE.
- Click
BACK to return to the
CWSJSONR page.
- Define a PCT resource
-
- On the
CWSJSONR page, click
NEW and then select
PCT from the drop-down list.
- Complete these fields:
Name
|
RVRS
|
Description
|
CWS transaction to invoke the reverse service
|
Program Name
|
invkRevJ
|
- Click
SAVE.
- Click
BACK to return to the
CWSJSONR page.
- Open the DEMOSTRT startup list
-
- Expand
Startup Lists to see the list of CICS
STARTUP LISTS.
The
CWSJSON region uses the default startup list, named DEMOSTRT.
- Click
DEMOSTRT.
This opens the
DEMOSTRT page in the right pane.
- Add resource groups to the startup list
-
- On the
DEMOSTRT page under
GROUPS, click
ADD.
- On the
Available Groups list, check the
DFHPIPE,
DFHWEB, and
CWSJSONRgroups.
- Click
Select.
This adds all groups to the end of the list.
- Cllick
APPLY.
Install resources
You can install new and changed resources by stopping and starting the region.
- From the
Server Explorer in
Visual Studio , right-click
CWSJSON; then select
Restart. This stops and then starts the
CWSJSON
enterprise server region, automatically installing and loading the newly added resources on the startup list.
Verify Resources
After
CWSJSON is started, you can verify that the resources you have defined are installed and active.
- From the ESCWA UI, click the
CWSJSON server in default list.
- From the
CICS drop-down list in the right pane, select
Resources.
- Set the first field to the right of
RESOURCES to
Active.
- On the resulting list of active resources, click
Bundle. You should see the
REQBNDL and
RESPBNDL bundles listed and marked as
ENABLED.
- 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/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.
- Close ESCWA.