Guides you through the process of adding the operations that enable the COMMWS Web service to interact with the INCCA and
SECCA programs.
Define the InvokeINCCA operation
This operation receives data, sends it to the application, and returns data following application processing.
- Create the InvokeINCCA operation
-
- In the
Interface Mapper, right-click the
Operation button, and then select
New from the context menu.
- In the
Operation Name field, type
InvokeINCCA.
- Under
Select program/copybook, click
INCCA.
The
Interface Mapper parses the code for candidate COMMAREAs from which to choose. This includes:
- dfhcommarea, which is a COMMAREA field specified on an EXEC CICS RETURN statement
- Fields that are sources or targets of COBOL move statements involving
dfhcommarea
- Click
INCCA under both
Select input data area and
Select output data area.
The INCCA program defines only
dfhcommarea, and thus this is the only C0MMAREA shown. You can optionally expand and contract the code to see its contents.
- Do not check
Create Default Mappings.
- Click
OK to create the InvokeINCCA operation.
The
Interface Mapper shows the input and output COMMAREA fields in the left panes.
- Map input interface fields
-
Web Service interfaces receive inbound data from a SOAP request. To receive the data and then pass it into our COMMAREA, you
must map the following COMMAREA fields to the interface as input fields:
- int-fld
- comp-fld
- dec-fld
- disp-fld
- string-fld
- Drag
int-fld from the
Input Data Area pane to the
Interface Fields pane.
Note: Alternatively, you can create this mapping by right-clicking
int-fld in the
Input Data Area pane and selecting
New Input Field from the context menu.
- In the
Interface Fields pane, double-click
int_fld.
- In the
Name field, type
InIntFld; then click
OK to rename the field.
- Drag the following fields from the
Input Data Area pane to the
Interface Fields pane and rename each as indicated:
Input Data Area Field
|
Interface Field Name
|
comp-fld
|
InCompFld
|
dec-fld
|
InDecFld
|
disp-fld
|
InDispFld
|
string-fld
|
InStringFld
|
- Map interface output fields
- The sample programs modify the data in the COMMAREA fields, and then the service interface passes the modified data back to
the requester in a SOAP response. Therefore, you must map the same COMMAREA fields, plus the
grp-fld array, to the interface as output fields. The
grp-fld array does not receive input from the SOAP request, but the program moves data into it as it processes the request. This
means that you need to map an output interface field to the
grp-fld array.
- Drag the following fields from the
Output Data Area pane to the
Interface Fields pane and rename each as indicated:
Input Data Area Field
|
Interface Field Name
|
int-fld
|
OutIntFld
|
comp-fld
|
OutCompFld
|
dec-fld
|
OutDecFld
|
disp-fld
|
OutDispFld
|
string-fld
|
OutStringFld
|
grp-fld
|
OutGrpFld
|
- Map a work field
- Work fields store data that can be passed from one operation to another. This service interface requires a work field to pass
the contents of the
string-fld COMMAREA field from the
InvokeINCCA operation that you are defining now, to the
InvokeSECCA operation that you define in the next phase of this tutorial.
- In the
Work Fields pane, right-click; then select
New Work Field from the context menu.
- In the
Name field, type
WrkString, and type
80 into the
Length field; then click
OK.
- Create a field assignment
- To assign a value to the
WrkString work field, you create a field assignment.
- In the
Assignments pane, right-click and select
New Assignment from the context menu.
- From the
Assign to drop-down list, select
WrkString.
- From the
Field/Operation1 drop-down list, select
dfhcommarea.string-fld.
- Click
OK to save the assignment.
- Click
File > Save COMMWS.svi to save the completed InvokeINCCA operation.
Define the InvokeSECCA Operation
This operation passes the value stored in the
WrkString work field a COMMAREA field in the SECCA program where it is modified and returned.
- Create the InvokeSECCA Operation
-
- In the
Interface Mapper, right-click the
Operation button, and then select
New from the context menu.
- In the
Operation Name field, type
InvokeSECCA.
- Under
Select program/copybook, click
SECCA.
The
Select input data area and
Select output data area boxes each list two COMMAREAs from which to choose. This is because the Interface Mapper has found two candidate COMMAREAs
in the SECCA program.
- Click each of the COMMAREA list entries to compare the two. From studying the code in the SECCA program, you know that the
program moves the contents of
dfhcommarea to
wrkcommarea before performing business logic using the COMMAREA fields. Therefore, you want this operation to use the
wrkcommarea for both input and output.
- Click
SECCA(2) under both
Select input data area and
Select output data area.
- Do not check
Create Default Mappings. In this tutorial, you create the mappings manually.
- Click
OK to create the InvokeSECCA operation.
The
Interface Mapper shows the input and output data area fields in the left panes.
- Create a Field Assignment
- To pass the value you stored in the
WrkString work field during the InvokeINCCA operation to the
in-string COMMAREA field, you need to create a field assignment.
- In the
Assignments pane, right-click and select
New Assignment from the context menu.
- From the
Assign to drop-down list, select
wrkcommarea.in-string.
- From the
Field/Operation1 drop-down list, select
WrkString.
- Click
OK to save the assignment.
- Map an Interface Output Field
- The SECCA program logic takes the value of
in-string, prepends "SECCA received: " to it and stores the result in
out-string. To send the value back to your service interface, you need to map
out-string to an output interface field.
- Drag
out-string from the
Output Data Area pane to the
Interface Fields pane.
- From the
Interface Fields pane, rename
out_string to
SECCAOutString.
- Click
File > Save COMMWWS.svi to save the completed InvokeSECCA Operation.
- Close the
Interface Mapper.