Tuesday, May 19, 2009

wsrp oc4j container on Oracle AS 10.1.3.4 + wsrp-samples.ear

How to install wsrp in an OC4J container on Oracle AS 10.1.3.4 and deploy wsrp-samples.ear and test if everything works in Oracle AS portal 10.1.4.

Download the wsrp sources from metalink: Patch number: 7356288
WSRP-PREDEPLOY.JAR IS DUPLICATING ENTRIES FOR THE SPRING CONTEXT LOADER

Download wsrp-samples.ear application:
http://download.oracle.com/otndocs/tech/webcenter/files/pdksoftware.zip


createinstance -instanceName oc4j_wsrp -groupname default


Output:

Creating OC4J instance "oc4j_wsrp"...
Set OC4J administrator password for "oc4j_wsrp" (password text will not be displayed as it is entered):
Enter password:
Confirm password:
A new OC4J instance "oc4j_wsrp" is created in the group "default".


Do not start the container!!!!!!

Install the wsrp in the oc4j container

java -jar portlet-server-install-v1.jar $ORACLE_HOME/j2ee/oc4j_wsrp


Output:

File "$ORACLE_HOME/j2ee/oc4j_wsrp/config/global-web-application.xml" modified successfully
File "$ORACLE_HOME/j2ee/oc4j_wsrp/config/server.xml" modified successfully
Beginning install of libraries to "$ORACLE_HOME/j2ee/oc4j_wsrp/applib"
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/commons-logging.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/dom4j.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/jaxrpc-api.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/jaxrpc-ri-patched.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/namespace.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/ptlshare.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/relaxngDatatype.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/saaj-api.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/saaj-ri.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/wsrp-common.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/wsrp-container.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/xml.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/xmlmesg.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/xmlparserv2.jar"...
Extracting "$ORACLE_HOME/j2ee/oc4j_wsrp/applib/xsdlib.jar"...
Installing "$ORACLE_HOME/j2ee/home/jsp/lib/taglib/oracle-portlet-tags.jar"...
Install Complete


Start the oc4j container.

wsrp can work with an file based preference store or with an database as preference store. In this example we will user the file based option which is default.

Before we can deploy the wsrp-samples.ear we have to change the file $ORACLE_HOME/j2ee/oc4j_wsrp/config/server.xml import a jar. Under <shared-library name="oracle.wsrp" version="1.0"> add <import-shared-library name="oracle.ws.jaxrpc"/>.

Now unzip the downloaded pdk pdksoftware.zip.

Search for the wsrp-samples.ear (directory: pdk/portlet-container)

Deploy the ear file from the command line:

java -jar admin_client.jar deployer:oc4j:[HOSTNAME]:[OPMN_REQUEST_PORT] oc4jadmin [PASSWORD] -deploy -file wsrp-samples.ear -deploymentName sampleapp -bindAllWebApps


If everything is ok there should be a servlet:
http://[HOSTNAME]:[PORT]/portletapp/info

Now the provider can be registerd in portal with the WSDL:
http://[HOSTNAME]:[PORT]/portletapp/portlets?WSDL

If you want to make your application wsrp ready the following should be done to "infect" your ear file with the Oracle stuff:


java -jar wsrp-predeploy.jar


Refer:
http://download.oracle.com/docs/cd/B32110_01/webcenter.1013/b31074/jpsdg_java_intro.htm#BHCCCFID

Metalink note: 341922.1


Did this post help you in any way can you please leave a comment? This will motivate me writing more posts.

No comments:

Post a Comment

comment