Previous Topic Next topic Print topic


Debug the Web service

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

  1. Stop the JBoss Server.
    1. Click the Servers tab.
    2. Right-click JBoss AS 7.1, and then click Stop.
  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 opens 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 are displayed.
  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 is 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.
Previous Topic Next topic Print topic