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: WSRPTestPortlet error -- Newbie Question
Date Fri, 17 Dec 2004 12:14:34 GMT
     I think you are running incorrectly the examples. If you use the 
SwingConsumer, you do not access the portlets of the producer through a 
browser, but only with the swing interface. If you want to use a consumer 
portal (accessible through a browser) to use the wsrp portlets exposed by the 
producer, you have to deploy the ProxyPortlet portlet bundled with wsrp4j into 
the consumer portal and configure the access to the portlets you are going to 
consume.
     There is another thread in this list in which it's explained how to set up 
Pluto Portal to consume WSRP4J Producer portlets. I've attached it below.

     If I'm wrong please be more specific on your error and environment.

Regards.
Diego.

--------------------------------------------------------------------------------

Diego, Matthew

Thanks for all your hints and advice - I finally have the proxyportlet
working. Here is what I did...

(a) In the Pluto Portlet Container I have edited the
portletentityregistry.xml for a single portlet:

<?xml version="1.0" encoding="UTF-8"?>
<portlet-entity-registry>
     <!-- wsrp4j wsrp proxy portlet -->
	<application id="98">
     	<definition-id>proxyportlet</definition-id>
     	<portlet id="1">
         	<definition-id>proxyportlet.ProxyPortlet</definition-id>
             <!-- portlet -->
         	<preferences>
             	<pref-name>wsrp_portlet_handle</pref-name>
             	<pref-value>99.1</pref-value>
             	<read-only>false</read-only>
	        </preferences>
             <!-- producer -->
     	    <preferences>
         	<pref-name>wsrp_producer_id</pref-name>
             	<pref-value>1</pref-value>
	        <read-only>false</read-only>
     	    </preferences>
	    </portlet>
	</application>
</portlet-entity-registry>

(b) I then edit the page registry pageregistry.xml for a single portlet too,
with a valid portlet application ID and valid portlet ID, so 98.1:

<?xml version="1.0" encoding="UTF-8"?>
<portal>
     <fragment name="navigation"
class="org.apache.pluto.portalImpl.aggregation.navigation.TabNavigation">
     </fragment>

     <fragment name="ProxyTest" type="page">
         <navigation>
             <title>ProxyTest</title>
             <description>This page contains wsrp4j
proxyportlets</description>
         </navigation>

         <fragment name="row1" type="row">
             <fragment name="col1" type="column">
                 <fragment name="p1" type="portlet">
                     <property name="portlet" value="98.1"/>
                 </fragment>
             </fragment>
         </fragment>
     </fragment>
</portal>

(c) I then edit the producer file with the seriously long file name for the
proxyportlet:

org.apache.wsrp4j.consumer.driver.ProducerImpl@wsrp4j-8081.xml

and change all the references to port 8081 to port 8080

I also make sure that the producer ID is the same as the one that I set in
the as the wsrp_producer_id preference, in my case this is "1":

<?xml version="1.0"?>
<Producer id="1">


<markup-interface-url>http://localhost:8080/wsrp/wsrp4j/WSRPBaseService</mar
kup-interface-url>

<service-description-interface-url>http://localhost:8080/wsrp/wsrp4j/WSRPSer
viceDescriptionService</service-description-interface-url>

<registration-interface-url>http://localhost:8080/wsrp/wsrp4j/WSRPRegistrati
onService</registration-interface-url>

<portlet-management-interface-url>http://localhost:8080/wsrp/wsrp4j/WSRPPort
letManagementService</portlet-management-interface-url>

     <registration-data>
         <consumer-name>WSRP4J Proxy Portlet</consumer-name>
         <consumer-agent>WSRP4J Proxy Portlet</consumer-agent>
     </registration-data>
</Producer>

(d) I then modify the portletentityregistry.xml file in the /wsrp webapp
under Tomcat/webapps to register a single portlet with the same references
that I set in wsrp_portlet_handle preference, in my case this is 99.1:

<?xml version="1.0" encoding="UTF-8"?>
<portlet-entity-registry>

     <application id="99">
         <definition-id>portlet1</definition-id>
         <portlet id="1">
             <definition-id>portlet1.Portlet1</definition-id>
         </portlet>
     </application>

</portlet-entity-registry>

(e) I then restart Tomcat and go to http://localhost:8080/pluto/portal. All
is working so far and I see a link to "proxyportlet"

(f) Hurray! The proxy portlet is working.

Thanks guys - your advice and experience has been very helpful indeed.

Wishing you every success in your projects.

Warwick R Bailey MRSC CChem

Icodeon Ltd
Studio 471
48 Regent Street
Cambridge CB2 1FD
England

e: warwick@icodeon.com
w: www.icodeon.com

Registered Company in England and Wales No: 5068195

Mime
View raw message