Locally Debugging Web Services

You can quickly debug a web service created in JDeveloper by debugging it locally. There are two ways to do this:

There are three steps to perform:

  1. Turn off JDeveloper's proxy settings.
  2. Run the web service in the embedded server in debug mode.
  3. Create a sample Java client for the web service and run it.

Note: If you are debugging a SOAP EJB web service for the first time, you need to register the EJB web service providers with the SOAP server in the embedded OC4J. For more information, see Registering EJB Web Service Providers with OC4J.

Turning off JDeveloper's Proxy Settings

Before locally debugging a web service, you should turn off JDeveloper's proxy settings. Remember to turn the proxy settings back on when you have finished debugging.

To turn off proxy settings:

  1. Choose Tools | Preferences, and select Web Browser/Proxy.
  2. Deselect Use HTTP Proxy Server.

Running the Web Service in Debug Mode

The next step is to run the web service in debug mode in the embedded server. If you want to debug the web service class, you should first set breakpoints at the appropriate places.

To run the web service:

Creating and Running the Sample Java Client

You can quickly create a sample Java client for the web service.

To create a sample Java client:

  1. In the navigator, right-click the web service container, and choose Generate Sample Java Client. A Java class called Embedded <web_service>Stub.java is generated and displayed in the Code Editor.
  2. If you are debugging the stub to the web service, add one or more breakpoints, right-click and choose Debug .
    Alternatively, if you have set breakpoints in the web service class, choose either Debug or Run from the context menu.
    The debugger operates as for any Java class. For more information, refer to Debugging Java Programs.

About the Debugger Windows
Moving Through Code While Debugging

 

Copyright © 1997, 2004, Oracle. All rights reserved.