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
, 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.
- On the
Server Explorer, right-click
Local [localhost:86]; then select
New > Enterprise Server.
- In the
Name field, type
JSONREQ.
- Click the
Browse button that corresponds to the
Template field, and navigate to the
CICSWebServicesTemplate.xml file located in the
InvokeReverseJSON project folder.
- Double-click
CICSWebServicesTemplate.xml.
- On the list next to
Associate with projects, check
InvokeReverseJSON.
- 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
-
- 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
-
- Start ES Monitor and Control (ESMAC)
-
- After JSONREQ has started, on the
Enterprise Server Administration
Home page, click the
Details button located in the
Status column for the
JSONREQ region.
- On the
Server > Control page, click
ES Monitor & Control.
- Open the DEMOSTRT startup list
-
- On the ESMAC menu, click the drop-down list located under
Resources; then select
by Group.
- Click
Startup.
- 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.
- 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.
- In the new empty field, type
DFHPIPE; then click
Apply.
- In the new empty field, type
JSONREQ; then click
Apply.
- Create the JSONREQ resource group
-
- On the
ESMAC menu, click the
Groups button located under
Resources.
- On the
CICS Resource Groups page, click
New.
- In the
Name field, type
JSONREQ.
- 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
-
- 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.
- Complete these fields:
Name
|
REVRSURI
|
Description
|
URIMAP for JSON reverseJ request
|
Usage
|
Client
|
Port
|
5482
|
Host
|
localhost
|
Path
|
/cics/services/json/reverse
|
- Click
Add; then click
Apply.
- Click
Group List to return to the
CICS Group JSONREQ page.
- Add Bundles
-
- Click
Bundle.
- Complete these fields:
Name
|
REQBNDL
|
Description
|
Input bundle to map the data structure to a JSON request
|
Bundle Dir
|
$IDE_BUNDLE_LOC\REQBNDL
|
- Click
Add; then click
Apply.
- Click
Group List to return to the
CICS Group JSONREQ page.
- Click
Bundle.
- Complete these fields:
Name
|
RESPBNDL
|
Description
|
Output bundle to map the JSON response to a data structure
|
Bundle Dir
|
$IDE_BUNDLE_LOC\RESPBNDL
|
- Click
Add; then click
Apply.
- Click
Group List to return to the
CICS Group JSONREQ page.
- Add PCT
-
- Click
PCT.
- Complete these fields:
Name
|
INVJ
|
Description
|
CWS transaction to invoke the reverse service
|
Program Name
|
invkRevJ
|
- Click
Add; then click
Apply.
- 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.
- From the
Enterprise Server Administration
Home page, start ESMAC for the
JSONREQ region, just as you did in the previous section.
- On the
ESMAC menu, select
Active from the drop-down list located under
Resources.
- On the
ESMAC menu, click the
WebSvc button. You should see the
ReverseJ Web service listed and marked as
INSERVICE.
- 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.
- 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.
- Close
Enterprise Server Administration.