The Preview JAX-RPC Web Services for Oracle JDeveloper 10g provides
the first version of support for JAX-RPC web services which can be deployed
to application servers that implement the J2EE 1.4 specification. The J2EE 1.4
specification includes JAX-RPC 1.1 runtime (see: http://java.sun.com/xml/jaxrpc/)
as well as JSR 109 deployment (see http://www.jcp.org/en/jsr/detail?id=109).
This document describes how to install the extension, and it lists known restrictions
and problems.
Note: In order to create JAX-RPC web services
in JDeveloper using this JDeveloper extension you must separately download the
Oracle Application Server Containers for J2EE 10g (10.0.3) Developer
Preview, which is available from OTN from http://otn.oracle.com/software/products/ias/preview.html.
Oracle Application Server Containers for J2EE 10g (10.0.3) Developer
Preview must be installed either locally or on a network server. It is available
from the Oracle Technology Network (OTN) at http://otn.oracle.com/tech/java/oc4j/contentr2.html.
Installing Oracle JDeveloper 10g
Follow the installation instructions that come with the download.
Installing 10g (10.0.3) Developer Preview
You need to have the correct version of the JDK to install OC4J. Check the
version of Java by typing java -version at a command prompt.
It should report java version "1.4.1_02", which is
the version available from the JDeveloper. If another version is reported
add the location of the JDeveloper version of the JDK accessible. From the
command line run set path=d:/<jdev_home>/jdk/bin;%path%, where
<jdev_home> is the folder where JDeveloper was
installed.
Expand the downloaded zip file into a directory that will become your oc4j
root directory.
Next you run the OC4J installation:
Navigate to <oc4j_home>/j2ee/home where
<oc4j_home> is the folder where OC4J is installed.
Run java -jar oc4j.jar -install
You will be prompted for a password. In the common.xml file
it is assumed that this password is welcome. If you are using
a different admin password for OC4J, modify the oc4j.admin.pwd
property in common.xml accordingly.
Installing the JAX-RPC Web Services Extension
The JAX-RPC extension zip file contains two JAR files:
jaxrpc_extension.jar
web_services.jar
Install them as follows:
If JDeveloper is running, shut it down.
Install jaxrpc_extension.jar into the <jdev_home>/jdev/lib/ext
folder.
Locate the web_services.jar file in the <jdev_home>/jdev/doc/ohj
folder and rename it. Then copy the web_services.jar file from
this extension to the same folder.
Configuring JDeveloper to use the Extension
Once you have installed the JAR file that comprise this extension, you have
to configure JDeveloper to use the OC4J 10g (10.0.3) Developer Preview.
In JDeveloper, select Tools | Preferences
and then select JAX-RPC Web Services in the Preferences
dialog. If JAX-RPC Web Services is not listed, check that you have installed
the jaxrpc_extension.jar in the correct folder.
Enter the location of the folder where you installed the OC4J 10g
(10.0.3) Developer Preview.
Now you can create web services for deployment to OC4J using the Create Web
Service wizard by selecting JAX-RPC Web Services as the deployment platform
on the first page of the wizard.
Uninstalling the JAX-RPC Web Services Extension
Uninstall the JAX-RPC extension as follows:
If JDeveloper is running, shut it down.
Navigate to <jdev_home>/jdev/lib/ext, and delete
jaxrpc_extension.jar.
Navigate to <jdev_home>/jdev/doc/ohj. Delete
the JAX-RPC web services extension web_services.jar file, and
rename the original web_services.jar file to its original name.
In this preview version of JDeveloper's JAX-RPC web service support, you can
only create a JAX-RPC web service from a stateless Java class. Java classes
on which JAX-RPC web services are based must implement an interface which extends java.rmi.Remote. The interface has to describe each service method
by creating a signature for the method which throws java.rmi.RemoteException.
With OC4J running (see Software Requirements
above), create an application server connection. Make sure that on the Connection
page of the Create Application Server wizard, you change the local directory
where admin.jar for OC4J is installed from the JDeveloper folder to the folder
containing OC4J 10g (10.0.3) Developer Preview.
With the project containing the class selected in the Applications Navigator,
open the New Gallery by choosing File | New.
Invoke the Create Web Service wizard by expanding General,
and selecting Web Services in the Categories list,
and Java Web Service in the Items list.
On the first page of the wizard, select JAX-RPC Web Services
as the deployment platform. Press Help
or click F1 on any page of the wizard to see the online help.
On the second page of the wizard, enter or browse to the service endpoint
interface, and select the SOAP message format.
Deploying the Service to OC4J
Now that you have created the web service, you can deploy it to OC4J.
Start OC4J. At the command line, navigate to <oc4j_home>/j2ee/home
where <oc4j_home> is the folder where OC4J is
installed.
Run java -jar oc4j.jar -install
In JDeveloper's Application Navigator, expand the Resources node and right-click
on the deployment archice, WebServices.deploy. Choose Deploy
to from context menu and select the application server connection you
created earlier.
Creating a Proxy to a JAX-RPC Web Service
In this version of JDeveloper's JAX-RPC web service support, you can create
a proxy to a JAX-RPC web service from the context menu of the WSDL.
With the web service container selected in the navigator, select the WSDL
in the Structure Pane. Right-click and choose Generate
JAX-RPC Proxy.
In the Generate JAX-RPC Proxy dialog, enter a name for the package for the
generated stub.
This version of JDeveloper's support for JAX-RPC web services is a preview
version of the functionality. It only allows you to create JAX-RPC web services
from stateless Java classes. You cannot yet create JAX-RPC web services from
EJBs, JMS destinations, stored procedures, and so on.
Web services created using this version of JDeveloper's support for JAX-RPC
web services can only be deployed to OC4J 10g (10.0.3) Developer
Preview.
WS-I analysis for JAX-RPC web services created using JDeveloper only works
with WS-I Testing Tools - Beta Release 3 (v0.96). For more information, see
the WS-I website at http://www.ws-i.org.
You can only have one JAX-RPC web service in a project. If you have more
than one, the details of
the service generated most recently will be the only ones listed in webservices.xml,
oracle-webservices.xml and web.xml.
In this version of JDeveloper's JAX-RPC support:
Don't use primitive wrapper classes (e.g. java.lang.Integer) as parameters
to RPC/encoded services.
Don't use complex types with array properties as parameters in document/literal
or RPC/literal web services.
The existing stub generation wizard does not support creating stubs for
JAX-RPC web services that use arrays of JavaBeans using doc or rpc/literal
encoding. To work around this, there is a new dialog on the context menu of
a WSDL to generate a JAX-RPC client. However, this dialog does not give the
flexibility that the wizards give (for example, adding a main method to stub,
authentication).
Known Problems
Make sure that the embedded server in JDeveloper is not running. If it is
choose Run | Terminate and select
Embedded OC4J Server.
You must ensure that the project name for your web service does not have
a space in it, otherwise you may not be able to deploy the service to OC4J.
Generating a stub or proxy to a JAX-RPC web service using the Create Web
Service Stub/Skeleton wizard will cause the project node in the navigator
to close. Click the project node to re-open it. The project is not closed
if the stub is created from the context menu of the WSDL in the Structure
pane.
You cannot create a stub to a JAX-RPC web service that returns an array
using the Create Web Service Stub/Skeleton wizard, and you may find problems
with stubs that create other types. To avoid this, create the stub using the
context menu of the WSDL.
Every time you generate a JAX-RPC service, oracle-webservices.xml,
webservices.xml and web.xml are overwritten. This
means that you can only have one JAX-RPC service per project, and if you add
it after any J2EE web services, it'll overwrite the details of the J2EE web
service from web.xml. The web.xml entries for the
J2EE web services can be added back by regenerating those services.
Entries for a JAX service will still appear in webservices.xml
and oracle-webservices.xml after the service has been deleted.
They can be removed by hand.