portals-wsrp4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diego Louzán <diegolou...@metalicana.org>
Subject Re: HelloWorld
Date Wed, 15 Dec 2004 09:52:42 GMT
     For a good introduction to what WSRP is you should read the «WSRP Primer». 
You can find it in 
This document should resolve most of your doubts.
     To put it simple, WSRP is **totally independent** of JSR-168 (although 
WSRP is conceived for easy integration with JSR-168). The communication that 
WSRP enforces is through SOAP protocol between a Consumer and a remote 
Producer, the two of them implementing the WSRP interfaces. But the backend of 
portlets is not imposed, it could be a JSR-168 compliant portal (the usual 
case) or a propietary solution.
     In the case of WSRP4J, the backend is a JSR-168 portlet container, which 
is Pluto. The Consumer is a JSR-168 portlet (ProxyPortlet) that translates the 
calls of the Portlet API to similar ones in WSRP API. The Producer runs an Axis 
SOAP receiver that gathers the WSRP calls and translates them to actual calls 
to Portlet API. In the Producer you create your own Portlets (implementing 
GenericPortlet) and once deployed they are accesible to any Consumer that 
registers with the Producer. But keep in mind this is particularly WSRP4J. 
There are other WSRP solutions that work differently.


Durfee, Bernard wrote:
> Hi Diego,
>  This is exactly the dialog that I am looking for. I really want to understand what WSRP4J
is. From the overview documentation it looks like WSRP4J provides two things...
> 1) A WSRP producer implementation that translates between a consumer (e.g. portal) talking
WSRP and a portlet talking JSR-168.
> 2) A WSRP consumer implementation that translates between a portal talking JSR-168 and
a portlet talking WSRP.
> ...so if I want to create a 'Hello World' portlet, I would implement a GenericPortlet.
Now I can add my portlet to a portal directly or expose it to the world as a WSRP producer
by using WSRP4J. Then I can register the WSRP4J consumer with my portal, point it at the WSRP4J
producer and now my portlet can run remotely with WSRP4J handling the SOAP communication.
> So really WSRP4J is more of a two part deployment tool. It allows JSR-168 portlets to
be exposed as WSRP services and for WSRP services to be deployed as JSR-168 portlets. But
ultimately my portlet, whether it talks JSR-168 or WSRP doesn't know about WSRP4J. WSRP4J
just facilitates the communication between portals and portlets. Does that sum it up?
> Bernie Durfee
> -----Original Message-----
> From: Diego Louzán [mailto:diegolouzan@metalicana.org] 
> Sent: Tuesday, December 14, 2004 11:27 AM
> To: wsrp4j-user@ws.apache.org
> Subject: Re: HelloWorld
>      Mmm, don't know exactly what do you want. There are two posibilities:
> * If you mean creating a new WSRP Producer implementation, this is way more 
> complicated than you explain. The communication between the Consumer and 
> Producer is through SOAP protocol, so in the Producer you have to configure a 
> SOAP receiver (in WSRP4J is Axis) that decodes the xml communication to actual 
> calls on the Java classes. The class that receives this calls is, as you 
> mention, the WSRPEngine, which in turn, delegates them to the implementation 
> you are giving (the pluto implementation classes in WSRP4J). You should 
> implement a new producer and register it in configuration files (mainly you 
> would have to edit producer/war/WEB-INF/classes/WSRPServices.properties in 
> WSRP4J cvs distribution).
> * If you mean deploying the WSRP4J Producer in a web container to expose some 
> portlets and then configure the WSRP4J ProxyPortlet as a Consumer in a portal 
> implementation, then you can follow the very excellent instructions given by 
> Warwick Bailey in another post of this thread. This alternative is much easier. :-)
>      As you mention, there's a Producer interface in package 
> org.apache.wsrp4j.consumer, but this is an interface to track the different 
> Producers a Consumer can be attached in a given moment (it's easy to understand 
> that a consumer can be consuming resources from different producers). In the 
> producer package there isn't a Producer interface because there is only one 
> producer: the implementation you are giving. You should take a look to 
> ProxyPortlet code to understand this.
> Regards.
> Diego.
> Durfee, Bernard wrote:
>>I am new to WSRP4J and I figure the best way to get started is with a 
>>standard HelloWorld class. I would like to create a producer that will 
>>eventually be exposed to the world via WSRP. Are these the appropriate 
>>1) Create a class implementing the org.apache.wsrp4j.consumer.Producer
>>2) Register an instance of WSRPEngine with a servlet container such as 
>>3) Register my hello world WSRP producer with the WSRPEngine, not sure 
>>how this is done yet. Now my WSRP producer should be exposed to the 
>>world. Tomcat will take the requests and send them to the WSRPEngine. 
>>The WSRPEngine will then push the requests to my producer through the 
>>org.apache.wsrp4j.consumer.Producer interface.
>>4) Now to make my WSRP producer useful to a human, I need to expose it 
>>via a consumer. So I run something like a uPortal consumer channel, 
>>point it to my WSRP producer and BAM, my producer lives.
>>Is this basic, super high level view correct? If so, then I have some 
>>Why is the 'producer' interface under the 'consumer' package?
>>How do I register the WSRPEngine with Tomcat? Is there some sort of 
>>servlet adapter?
>>How do I register my WSRP producer with the WSRPEngine?
>>Thanks in advance!
>>Bernie Durfee

View raw message