Debug the Web service

The web service can be debugged in both the Java and COBOL programs.

  1. Stop the JBoss Server.
    1. Under the main views should be a series of tabs. Click on the Servers tab.
    2. Along the border will be a red square. Click on this to stop the server.
  2. Set some breakpoints:
    1. 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.
    2. In the COBOLBook project set a break point in the do-read-record section of book.cbl.
  3. Right click on the DynWebTest1 project and select Debug As > Debug on Server. This brings up a Debug On Server dialog box.
  4. Click Finish.
  5. Click Run > Launch the Web Services Explorer.
  6. Click on readBook. This brings up an Invoke a WSDL Operation page.
  7. Type 1111 into the stockNo field and click Go. The Eclipse Debugger should now stop in the readBook() method in BookLegacySkeleton.java.
  8. Open the Variables view from Window > Show View > Variables. As debugging proceeds through the applications current variables will be shown.
  9. Press F8 (Resume) to continue to the next breakpoint. Eclipse shows a "Source not found" message with an Edit Source Path button.
  10. Click on Edit Source Path bringing up the Edit Source Lookup Path dialog box.
  11. Select Add.
  12. Select COBOL Project then OK.
  13. 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.

  14. Use F5 to step through the application to investigate further.
  15. Press F8 to complete the operation and show the results in the Status pane of the Web Services Explorer.
  16. Use the Navigator pane in the Web Service Explorer to try other operations.