Provides instructions for adding logic to the generated
invkRev.cbl skeleton program that provides a URI port specification and a means of sending the specification to the
enterprise server region.
The generated skeleton program,
invkRev.cbl, contains some basic functionality that is common to any CICS Web service requester. In this case, it:
- Puts the
reverseRequest-input-parms data structure into the DFHWS-DATA container.
- Invokes the
reverserequest operation from the
reverse Web service provider.
- Populates the
reverseRequest-output-parms data structure from the response in DFHWS-DATA.
To provide the program with a URI and port that directs the request to the
enterprise server region that is running your Web service provider, you must edit the code.
- From the
Application Explorer view, double-click
invkRev.cbl to open it in the COBOL editor.
- In the
local-storage section, change the value of
ls-uri to:
"http://localhost:5482/cwsDemo/reverseMe".
- In the
procedure division,
ws-op-1 section, replace the comment code before the
exec cics put container statement (******* ...) with:
move 1 to myString-occurs
move 'esaelPeMesreveR' to myString(1)
- After the
exec cics get container command for
DFHWS-DATA, add the replace the comment code with following code to send the reversed string back to the terminal:
exec cics send text
from(reversedString(1))
freekb
end-exec
- Save the program and exit the editor.
Eclipse automatically builds the project to include your changes.