WSRP4J Notes

WSRP4J provides remote portal access to JSR-168 portlets using a web service interface.

WSRP4J is currently an Apache incubator project, meaning that it is very much work in progress, and does not issue any stable releases. The notes here are based on revision 369431 from the Apache subversion repository at


1. Installing WSRP4J

Initial system state for these notes:

Steps to install:

  1. Obtain the WSRP4J source code from the subversion repository to a working directory, e.g., D:/Work/ws-wsrp4j/. In subsequent instructions, the relative directory wsrp refers to this directory.

  2. Apply changes described in this message to the WSRP4J users' mailinglist (see "Additional comments" below for copy of these changes).

  3. Copy wsrp/build/ to wsrp/build/, and edit so that the TOMCAT_HOME library reads thus:

    • {{{TOMCAT_HOME=C:/DEV/Apache/Tomcat-5.5.9


  1. Make files similarly in all of the following directories:

    • {{{wsrp/build

wsrp/portlets/proxyportlet wsrp/portlets/wsrptest wsrp/portlets/calc }}}

  1. In directory wsrp/portlets/build, ensure that files calc.include.example and wsrptest.include.example have been renamed or copied as calc.include and wsrptest.include. (These are sentinel files that tell the build procedure to install the corresponding portlets.)

  2. From directory wsrp/build, Run the following commands:

    • {{{build install-provider-pluto

build install-swing-consumer }}}

  1. Start the Tomcat service. (If experiencing problems, it may help to delete old Tomcat logfiles first.)
  2. Go to directory wsrp/tools, and execute file tunnel.bat. This starts a TCPmonitor utility that relays traffic between the consumer and the provider.

  3. Go to directory wsrp/driver/SwingConsumer, and execute file run.bat. A new window should be displayed with "calc" and "wsrptest" portlets.

Note: there are two instances of file in the wsrp4j source tree, one of which (?) causes a lot of XML tracing information to be displayed in the Tomcat output log. Change the line org.exolab.castor.debug=true to org.exolab.castor.debug=false in these files to suppress this output.

2. Additional comments for getting WSRP4J running

These comments were posted by Matthew Dovey to the WSRP4J mailing list. I'm duplicating them here because there seem to be access problems with the mailing list archives.

There is just one file WEB-INF/data/xml/servletdefinitionmapping.xml which is out of sync with the version of pluto used in WSRP4J and replacing this with the file from Pluto1.0.1 solves a null pointer exception encountered. This is used to map the XML structure of web.xml files into a Java class defined in Pluto. The result of the mismatch was that castor was throwing an error about a missing public property in the Java class.

The result of this is that during initialisation the Pluto PortletDefinitionRegistryService doesn't start due to this Castor exception. So when WSRP4J tries to get the Portlet description, Pluto first tries to get the current running PortletDefinitionRegistryService which returns a null pointer, and then tries to execute method on this service, hence the null pointer exception.

So here are all the steps needed to get from a check out of the current source (revision 368445 as of 12 Jan 2005) to a version that compiles and works incorporating the things that Graham and myself have discovered:

  1. replace wsrp/provider/pluto/war/WEB-INF/data/xml/servletdefinitionmapping.xml with the one attached to this page (fixes the castor error and hence the null pointer error) servletdefinitionmapping.xml

  2. replace wsrp/build/build.xml with the attached file (this fixes the fact that the build file references an earlier version of castor no longer present in the repository) build.xml

  3. edit wsrp/SwingConsumer/setcpath.bat replace set CLASSPATH=%CLASSPATH%;.\lib\castor- with set CLASSPATH=%CLASSPATH%;.\lib\castor- (as above - I won't attach an edited version as some mail systems don't like batch files as attachments)

  4. put the attached web.xml into wsrp/portlets/wsrptest/war/WEB-INF (somehow this file appears to have gone missing but without it the test portlets don't work!) web.xml

  5. if running on JDK 1.5, copy the following files from /wsrp/lib/consumer to /wsrp/lib: xercesImpl-2.5.0.jar, xercesImpl-2.5.0.LICENSE, xml-apis-2.5.0.jar, xml-apis-2.5.0.LICENSE.

After that you can then go through the normal build procedure of copying and editing the various .EXAMPLE build files and running the build scripts in wsrp/build.

4. Attachments

There are 3 attachment(s) stored for this page.

-- GrahamKlyne 2006-01-11 15:46:33

Creative Commons License
The content of this wiki is licensed under the Creative Commons Attribution-ShareAlike 2.0 England & Wales Licence.

OSS Watch is funded by the Joint Information Systems Committee (JISC) and is situated within the Research Technologies Service (RTS) of the University of Oxford.