Before you can deploy a web service based on an EJB for the first time, you must register the providers for the EJB web service types that are supported:
These instructions apply to the embedded OC4J server in JDeveloper or a standalone OC4J instance.
Throughout this topic, <jdev_install> refers
to the location where JDeveloper is installed.
<jdev_install>
/soap/webapps/soap/soap/WEB-INF/soap.xml, to include the
following lines:<osc:providerManager> <osc:option
name="autoDeploy" value="true" /> </osc:providerManage
<hostname.domain> to the domain qualified hostname for
your machine, and save as instructed:
<jdev_install>/j2ee/home/statelessejb-provider.xml
<isd:provider xmlns:isd="http://xmlns.oracle.com/soap/2001/04/deploy/provider"
id="stateless-ejb-provider" class="oracle.soap.providers.ejbprov.StatelessEJBProvider">
<isd:option key="SecurityPrincipal" value="admin"/>
<isd:option key="SecurityCredential" value="welcome"/>
<isd:option key="ContextProviderURL" value="ormi://<hostname.domain>"/>
<isd:option key="FullContextFactoryName" value="com.evermind.server.rmi.RMIInitialContextFactory"/>
</isd:provider>
Save the following as <jdev_install>
/j2ee/home/statefulejb-provider.xml:
<isd:provider xmlns:isd="http://xmlns.oracle.com/soap/2001/04/deploy/provider"
id="stateful-ejb-provider" class="oracle.soap.providers.ejbprov.StatefulEJBProvider">
<isd:option key="SecurityPrincipal" value="admin"/>
<isd:option key="SecurityCredential" value="welcome"/>
<isd:option key="ContextProviderURL" value="ormi://<hostname.domain>"/>
<isd:option key="FullContextFactoryName" value="com.evermind.server.rmi.RMIInitialContextFactory"/>
</isd:provider>
Save the following as <jdev_install>
/j2ee/home/entityejb-provider.xml:
<isd:provider xmlns:isd="http://xmlns.oracle.com/soap/2001/04/deploy/provider"
id="entity-ejb-provider" class="oracle.soap.providers.ejbprov.EntityEJBProvider">
<isd:option key="SecurityPrincipal" value="admin"/>
<isd:option key="SecurityCredential" value="welcome"/>
<isd:option key="ContextProviderURL" value="ormi://<hostname.domain>"/>
<isd:option key="FullContextFactoryName" value="com.evermind.server.rmi.RMIInitialContextFactory"/>
</isd:provider>
<jdev_install> with
the appropriate path:Java -cp <jdev_install>
/lib/xmlparserv2.jar;<jdev_install>/soap/lib/soap.jar;
<jdev_install>/j2ee/home/lib/http_client.jar;
<jdev_install>/j2ee/home/lib/javax-ssl-1_2.jar;
<jdev_install>/j2ee/home/lib/jssl-1_2.jar;<jdev_install>
/j2ee/home/activation.jar;<jdev_install>/j2ee/home/mail.jar
oracle.soap.client.ProviderManagerClient
http://localhost:8888/soap/servlet/soaprouter deploy <jdev_install>
/j2ee/home/statelessejb-provider.xml
http://localhost:8888/soap/servlet/soaprouter deploy <jdev_install>
/j2ee/home/statefulejb-provider.xml
http://localhost:8888/soap/servlet/soaprouter deploy <jdev_install>
/j2ee/home/entityejb-provider.xml
http://localhost:8888/soap/servlet/soaprouter list
Now that you have the EJB providers registered at OC4J's SOAP server, you can create web services based on an EJB by invoking the Create Web Services wizard, and entering the EJB remote interface as the class to publish.
Copyright © 1997, 2004, Oracle. All rights reserved.