Monday Dec 29, 2008

Setting up a WSRP 2.0 Producer in Liferay or Websynergy

Here is a note on how to setup a WSRP Producer on Liferay or Websynergy instance. The OpenPortal WSRP Producer version 2.0 is integrated into the liferay trunk, the next major release of Liferay i.e version 5.2 will have both the OpenPortal WSRP Producer and Consumer integrated into it.

If you are looking for some notes on how to use the OpenPortal WSRP Consumer in liferay. Please refer to this earlier blog "Liferay consumes OpenPortal WSRP".

A. Setting the portal properties :

If you are using a liferay build/binary, before we start make sure that your portal-ext.properties has portlet container set to Sun Container.

Here is the snippet.


portlet.container.impl=sun


Note : The above configuration is not required on the websynergy binary/setup, Websynergy bundle by default sets the container to Sun.

Make sure you restart the server after this configuration.

B. Deploy a Portlet:

Now deploy any portlet, say a simple sample portlet like the the "Bookmark Portlet" binary readily available for download from the Portlet repository project.

Make sure this portlet works fine by adding to the user page before we proceed.

Note : You can deploy the above portlet either using the "Plugin Installer" or by copying to the hot deploy directory.

C. WSRP Producer administrative portlet:

The administrative functionality for the WSRP Producer are provided by a portlet called the "WSRP Producer", The same portlet is available or integrated into the "Control Panel" of the Liferay Portal.

Login as administrator and choose to use this portlet or choose the control panel --> WSRP Producer option to get the administrative GUI.

D. Creating a WSRP Producer :

Follow instructions below to create a WSRP Producer using the above GUI.

  1. Click on "Add Producer" button.
  2. Enter a name for the Producer.
  3. Choose your options
    1. Say 2.0 (To create a 2.0 WSRP Producer).
    2. Registration Required and Inband supported.
    3. More details on these options here.
  4. The newly created producer is disabled by default.
  5. To enable this producer, edit the producer by clicking on newly created producer.
  6. The "Bookmark Portlet" which we deployed should be available in "Unpublished" portlets list.
  7. Move this portlet from "Unpublished" to "Published" list.
  8. Save the configuration, by clicking on "save" button.
  9. The producer would still be disabled.
  10. Edit the producer again and change the status to "Enabled"
  11. Save the configuration.


The WSDL URL for this producer is automatically generated, You can get the URL in the edit screen of the producer, share this WSDL URL with the consumers who wish to use this portlet on their portal.

You can create any number of producer instances on the the same portal and export different list of portlets for each producer. As you can see setting up a WSRP 2.0 producer in Liferay is just a matter of few clicks without any need for programming effort.


Stay tuned on the OpenPortal WSRP Project mailing list for more information w.r.t to this integration.

Wednesday Mar 14, 2007

Deploying WSRP Producer and Consumer independently


Here are the steps for deploying WSRP Producer and WSRP Consumer separately on two different boxes or instances.  The deployment diagram is as shown below

To create this deployment configuration, Lets say we have 2 boxes
  1. Producer box
  2. Consumer box

as shown in the below image. We install just the WSRP Producer on the Producer box and WSRP Consumer on the Consumer box

 

 

 

Note on WSRP binary :

When you build the WSRP trunk binary. It would have create a "dist" directory with the following contents

  1. wsrp-configurator.jar
  2. wsrp - binary directory
The wsrp-configurator.jar is for the Java App Platform SDK distribution of the wsrp binaries that  are under the "wsrp" directory.  The configurator provides a java wrapper over the setup.xml that would be invoked by the Java App Platform SDK installer.

The wsrp-configurator.jar has a wsrp.zip file that has all the content of the "wsrp" binary directory.  You can choose to directly use the wsrp binary directory or even unzip the contents from wsrp-configurator.jar and use it.

For sake of simplicity choose to copy the dist/wsrp directory to a machine where you want to install the WSRP Producer and WSRP Consumer and follow the below mentioned  instructions.

Deploying the WSRP Producer :

On the Producer box
  1. Deploy glassfish
  2. Deploy portlet container
  3. To deploy WSRP Producer follow the below instructions
Use the following command to deploy the WSRP Producer :
ant -verbose -f setup.xml deploy-producer -DSERVER_HOME=/opt/SDK1/  -DSERVER_DOMAIN=/opt/SDK1/domains/domain1/

Use the following command to deploy the WSRP Producer admin portlet
ant -verbose -f setup.xml deploy-producer-admin-portlet -DSERVER_HOME=/opt/SDK1/  -DSERVER_DOMAIN=/opt/SDK1/domains/domain1/

Deploying the WSRP Consumer:

On the Consumer box
  1. Deploy glassfish
  2. Deploy portlet container
  3. To deploy WSRP Consumer follow the below instructions
Use the following command to deploy the WSRP Consumer :
ant -verbose -f setup.xml deploy-consumer -DSERVER_HOME=/opt/SDK2/  -DSERVER_DOMAIN=/opt/SDK2/domains/domain1/

Use the following command to deploy the WSRP Consumer admin portlet
ant -verbose -f setup.xml deploy-consumer-admin-portlet -DSERVER_HOME=/opt/SDK2/  -DSERVER_DOMAIN=/opt/SDK2/domains/domain1/

That's it you can access the http://<your-host>:<your-port>/portletdriver/dt on the WSRP Consumer and Producer boxes and administer the respective components.  You can point the Consumer to the Producer installation and render the remote portlets exported by the WSRP Producer.

About

trajesh

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today