The web service can be debugged in both the Java and COBOL programs.
- Stop the JBoss Server.
- Under the main views should be a series of tabs. Click on the Servers tab.
- Along the border will be a red square. Click on this to stop the server.
- Set some breakpoints:
- Set a break point in the return statement of the
readBook() method in the
BookLegacySkeleton.java file. Right-click in the margin and select
Toggle Breakpoint.
- In the COBOLBook project set a break point in the
do-read-record section of
book.cbl.
- Right click on the DynWebTest1 project and select
Debug As > Debug on Server. This brings up a Debug On Server dialog box.
- Click
Finish.
- Click
Run > Launch the Web Services Explorer.
- Click on
readBook. This brings up an Invoke a WSDL Operation page.
- Type
1111 into the stockNo field and click
Go. The Eclipse Debugger should now stop in the readBook() method in
BookLegacySkeleton.java.
- Open the Variables view from
Window > Show View > Variables. As debugging proceeds through the applications current variables will be shown.
- Press F8 (Resume) to continue to the next breakpoint. Eclipse shows a "Source not found" message with an
Edit Source Path button.
- Click on
Edit Source Path bringing up the Edit Source Lookup Path dialog box.
- Select
Add.
- Select
COBOL Project then
OK.
- Click
Select All then click
OK, then
OK a second time to close the dialog box.
Now the COBOL source code for
book.cbl will displayed.
- Use F5 to step through the application to investigate further.
- Press F8 to complete the operation and show the results in the Status pane of the Web Services Explorer.
- Use the Navigator pane in the Web Service Explorer to try other operations.