WSRP administration made easy
By karthiksudarshan on Nov 27, 2006
Anyone who has tried to use any WSRP implementation would know how difficult it is to get something working! So here is something simple to appease the famished.
Sun's Open Source WSRP Project at java.net provides the implementation of the WSRP 1.0 specification and runs on Sun's Open Source Portlet Container. The instructions on the WSRP project site are detailed and are in easy to understand and use steps. Please follow the instructions to get the source, compile and create a distribution. Once you have the distribution, to administer and manage the WSRP Producer and Consumer, two administration portlets are provided with the source, which are built along with the other sources.
Please ensure that JAVA_HOME is set to jdk 1.5 home as the admin server uses the platform MBean server to register the MBeans required for administration and management of WSRP Producer and Consumer. Follow the below steps to get your administration portlets up and running.
Start the Admin server:
- cd <wsrp-directory>/dist/wsrp
- Edit config/deployenv.conf file to provide the GLASSFISH_HOME and the data storage directory where the WSRP Producer and Consumer data will be stored. You may have already done this if you have deployed the WSRP Producer and Consumer. If so, then you can skip this step.
- cd <wsrp-directory>/dist/wsrp/admin
- $JAVA_HOME/bin/rmiregistry 1099 &
- $ANT_HOME/bin/ant -f run.xml
This will start the admin server and create a producers.xml file in the data storage directory specified in <wsrp-directory>/dist/wsrp/config/deployenv.conf and also a consumer.xml file containing the default information.
Deploy the Admin portlets:
- Access the Portlet Container Driver at http://<hostname>:<port>/portletcontainerdriver/dt
- Click on the Admin tab.
- In the Deploy a Portlet section, browse to the directory <wsrp-directory>/dist/wsrp/admin and select the wsrp-producer-portlet.war.
- Deploy the portlet.
- Similarly browse, select and deploy wsrp-consumer-portlet.war.
- Click on the Portlets tab. You should be able to access both the administration portlets, with an entry for SampleProducer in the WSRP Producer Portlet.
Use the Admin Portlets:
- Click on the SampleProducer link and update the Producer by selecting the Portlets that you want to be exposed to the Consumers.
- Copy the WSDL url of the Producer. Save the Producer.
- In the WSRP Consumer Portlet, click on New button.
- Provide the WSDL url of the Producer. (Paste the copied url)
- Click on Get Info button. This will get the Service Description of the Producer.
- Provide the appropriate details. Click on Save.
- The newly created Consumer would be visible in a table in the WSRP Consumer Portlet.
- Click on the "Create" link in the newly created Consumer row. This is to create a channel.
- Select one of the Portlets whose display names are provided in a drop down list (these are the portlets that are made available in the WSRP Producer), and provide the name for the channel.
- Click on Save. This will create a new channel for the remote portlet.
- Click on the WSRP tab. You will be able to access the remote portlet.
That's all there is to it really. The number of steps may seem to be overwhelming, but it is very easy to follow and will indeed get you up and running very quickly. Try it out and if you have any doubts, concerns, comments or downright criticisms please feel free to let us know at firstname.lastname@example.org.
Rock on. :)