Setting up a WSRP 2.0 Producer in Liferay or Websynergy
By trajesh on Dec 29, 2008
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.
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.
- Click on "Add Producer" button.
- Enter a name for the Producer.
- Choose your options
- Say 2.0 (To create a 2.0 WSRP Producer).
- Registration Required and Inband supported.
- More details on these options here.
- The newly created producer is disabled by default.
- To enable this producer, edit the producer by clicking on newly created producer.
- The "Bookmark Portlet" which we deployed should be available in "Unpublished" portlets list.
- Move this portlet from "Unpublished" to "Published" list.
- Save the configuration, by clicking on "save" button.
- The producer would still be disabled.
- Edit the producer again and change the status to "Enabled"
- 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.