Testing Modeled Web Services
Once you have created a modeled web service you may want to test it.
JDeveloper provides an embedded OC4J server that you can use to test and
debug your applications, and you can create a test client from the
modeled web service in your diagram.
To generate a test client:
-
Run the web service in the embedded OC4J server. Either:
-
Select the web service container in the navigator, right-click and
choose Run <web_service>
.
or
-
Select the modeled web service on the diagram, and choose
Run | Run <web_service>.
-
Create the test client. Either:
-
Click on the modeled web service on the diagram to select it.
Right-click and choose Generate | Samp
le Java Client
or
-
Click on the web service container in the navigator, right-click
and choose Generate Sample Java Client
.
The sample Java client is generated and displayed in the code editor
and the file is displayed in the navigator. The default name of
the sample Java client is embedded<java_class>
stub.java
.
-
In the sample Java client, find the comment that says
// Add
your own code here
, and add some code that calls an exposed
method in the web service using the stub, for example
stub.m()
where m()
is a method that has been exposed.
-
Make and run the test client. The results are displayed in the log
window.
If you see an error in the log window:
-
Check that the web service is running. See step 1.
-
If you are running DHCP, you may need to change the proxy settings in
JDeveloper to exclude your machine's IP address. See
Proxy Settings and JDeveloper.
Related topics
Modeling Web Services
Copyright © 1997, 2004, Oracle.
All rights reserved.