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:
-
By putting breakpoints in the web service class, then running a sample
Java client against it. This allows you to debug the service class
itself.
-
By putting breakpoints in the sample Java client.
There are three steps to perform:
-
Turn off JDeveloper's proxy settings.
-
Run the web service in the embedded server in
debug mode.
-
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:
-
Choose Tools | Preferences,
and select Web Browser/Proxy.
-
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:
-
In the navigator, right-click the web service container, and choose
Debug.
The embedded OC4J server is started in debug mode, and
the web service is deployed to it. The results are displayed in the
log window.
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:
-
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.
-
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.
Related topics
About the Debugger Windows
Moving Through Code While Debugging
Copyright © 1997, 2004, Oracle.
All rights reserved.