You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsrp4j-dev@portals.apache.org by dl...@apache.org on 2005/05/20 10:46:10 UTC
cvs commit: ws-wsrp4j/site/src/documentation/content/xdocs/gettingstarted config.xml
dlouzan 2005/05/20 01:46:10
Modified: site/src/documentation/content/xdocs/gettingstarted
config.xml
Log:
Added information on integrating PlutoPortal/ProxyPortlet.
Revision Changes Path
1.2 +146 -24 ws-wsrp4j/site/src/documentation/content/xdocs/gettingstarted/config.xml
Index: config.xml
===================================================================
RCS file: /home/cvs/ws-wsrp4j/site/src/documentation/content/xdocs/gettingstarted/config.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config.xml 28 Jun 2004 18:13:37 -0000 1.1
+++ config.xml 20 May 2005 08:46:10 -0000 1.2
@@ -2,31 +2,153 @@
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "http://apache.org/forrest/dtd/document-v12.dtd">
<document>
<header>
- <title>Configuring Portlets</title>
- </header>
- <body>
- <ol>
- <li>Edit the portletentityregistry.xml file.
- (e.g. c:/Tomcat4.1/webapps/wsrp/WEB-INF/data/portletentityregistry.xml)
- <p> Add a new application element for your webapp.</p>
- <p> The definition ID has to match the webapp name, so for the sample, this is wsrptest.</p>
- <p> The portlet id will map to its handle, so make up a number.</p>
- <p> The definition id maps to it's name in the portlet.xml file like
- so: <webapp-name>.<portlet-name></p>
- </li>
+ <title>WSRP4J Configuration</title>
+ </header>
+ <body>
+ <section>
+ <title>Producer Configuration</title>
+ <ol>
+ <li>
+ Edit the portletentityregistry.xml file. (e.g.
+ c:/Tomcat4.1/webapps/wsrp/WEB-INF/data/portletentityregistry.xml)
+ <p>Add a new application element for your webapp.</p>
+ <p>The definition ID has to match the webapp name, so for the sample,
+ this is wsrptest.</p>
+ <p>The portlet id will map to its handle, so make up a number.</p>
+ <p>The definition id maps to its name in the portlet.xml file like
+ so: <webapp-name>.<portlet-name></p>
+ </li>
+
+ <li>
+ Create a portlet.xml file in your webapps/webapp-name/WEB-INF/
+ directory.
+ <p>Use webapps/wsrptest/WEB-INF/portlet.xml as a reference.</p>
+ <p>The portlet name must match the second part of the definition id
+ above.</p>
+ </li>
+ <!--<note>WRT to handles. It looks like the handle looked for by the Consumer is
+ 0.1, but the portlet ID is 1. So if your new portlet has an ID of 3, then it's handle will be 0.3.
+ </note>-->
+ </ol>
+ </section>
+
+ <section>
+ <title>Consumer Configuration (SwingConsumer)</title>
+ <p>
+ Once you have your portlets configured on the producer side, to add a
+ portlet to the SwingConsumer you will need to create an xml file in
+ driver/SwingConsumer/persistence/portlets.</p>
+ <p>Use the existing files as a guide.</p>
+ </section>
+
+ <section>
+ <title>Consumer Configuration (ProxyPortlet)</title>
+ <p>
+ You'll need some portal environment for using the ProxyPortlet component
+ bundled with WSRP4J. The WSRP4J team has tested PlutoPortal, the minimal
+ portal component included with the Pluto distribution.
+ </p>
+ <p>
+ Firstly, make sure you have your portlets correctly configured in the
+ producer component.
+ </p>
+ <ol>
+ <li>
+ Configure your producer endpoint urls in the
+ proxyportlet/WEB-INF/persistence/producers/ directory. You have to
+ create one file per producer, the naming being
+ org.apache.wsrp4j.consumer.driver.ProducerImpl@<name>.xml, where
+ <name> is a name you choose. If you are
+ consuming you own local portlets, you don't have to do nothing, as
+ there's a file org.apache.wsrp4j.consumer.driver.ProducerImpl@wsrp4j-8081.xml
+ file with local configuration. Use one of the existing files as
+ guidance. Be sure to assign a unique producer id to your producer.
+ An example would be:
+ <source><![CDATA[
+<Producer id="100">
+ <markup-interface-url>
+ http://localhost:8081/wsrp/wsrp4j/WSRPBaseService
+ </markup-interface-url>
+ <service-description-interface-url>
+ http://localhost:8081/wsrp/wsrp4j/WSRPServiceDescriptionService
+ </service-description-interface-url>
+ <registration-interface-url>
+ http://localhost:8081/wsrp/wsrp4j/WSRPRegistrationService
+ </registration-interface-url>
+ <portlet-management-interface-url>
+ http://localhost:8081/wsrp/wsrp4j/WSRPPortletManagementService
+ </portlet-management-interface-url>
- <li>Create a portlet.xml file in your webapps/webapp-name/WEB-INF/ directory.
- <p>Use webapps/wsrptest/WEB-INF/portlet.xml as a reference.</p>
- <p>The portlet name must match the second part of the definition id above.</p>
- </li>
- <!--<note>WRT to handles. It looks like the handle looked for by the Consumer is
- 0.1, but the portlet ID is 1. So if your new portlet has an ID of 3, then it's handle will be 0.3.
- </note>-->
- <li>To add the portlet to the Consumer, you will need to create an xml file
- in driver/SwingConsumer/persistence/portlets.
- <p> Use the existing files as a guide.</p>
- </li>
- </ol>
+ <registration-data>
+ <consumer-name>WSRP4J Proxy Portlet</consumer-name>
+ <consumer-agent>WSRP4J Proxy Portlet</consumer-agent>
+ </registration-data>
+</Producer>]]></source>
+ Remember that the actual urls are configured in the tunnel.sh file
+ in the ws-wsrp4j/tools/ directory. You could add one tunnel.sh file
+ per producer (tunnel-ibm.sh, tunnel-bea.sh, etc) to be able to
+ distinguish each other network traffic.
+ </li>
+ <li>
+ At this point you have to remember your producer id (e.g. "100") and
+ your remote portlet identifier configured in the producer
+ (e.g. "0.1").
+ </li>
+ <li>
+ Now it's time to configure PlutoPortal. Please refer to
+ <link href="http://portals.apache.org/pluto">Pluto website</link>
+ on how to build & install it. There are two files involved,
+ both of them in the pluto/WEB-INF/data/ directory: pageregistry.xml
+ and portletentityregistry.xml.
+ </li>
+ <li>
+ The file portletentityregistry.xml controls the portlet applications
+ deployed by PlutoPortal. You have to create a new application element
+ like this:
+ <source><![CDATA[
+<application id="5">
+ <definition-id>proxyportlet</definition-id>
+ <portlet id="1">
+ <definition-id>proxyportlet.ProxyPortlet</definition-id>
+ <preferences>
+ <pref-name>wsrp_portlet_handle</pref-name>
+ <pref-value>0.1</pref-value>
+ <read-only>false</read-only>
+ </preferences>
+ <preferences>
+ <pref-name>wsrp_producer_id</pref-name>
+ <pref-value>100</pref-value>
+ <read-only>false</read-only>
+ </preferences>
+ </portlet>
+</application>]]></source>
+ The important lines are the wsrp_portlet_handle and wsrp_producer_id
+ preferences. The former has to be a portlet handle configured on the
+ producer ("0.1" in step 2), the latter it's the assigned producer id
+ ("100" in step 2). The configuration above creates a portlet
+ application in PlutoPortal with id "5.1", that accesses the remote
+ portlet "0.1" in the producer with id "100".
+ </li>
+ <li>
+ Finally, the file pageregistry.xml controls the portal pages layout.
+ You can find more information on
+ <link href="http://portals.apache.org/pluto">Pluto website</link>, but
+ if you add a line like this:
+ <source><![CDATA[
+<fragment name="row10" type="row">
+ <fragment name="col10" type="column">
+ <fragment name="p10" type="portlet">
+ <property name="portlet" value="5.1"/>
+ </fragment>
+ </fragment>
+</fragment>]]></source>
+ with unique identifiers "row10", "col10" and "p10", you'll get your
+ portlet displayed when you point your browser to PlutoPortal. The
+ property "portlet" has value "5.1" as that is the portlet application
+ we configured in the previous step.
+ </li>
+ </ol>
+ </section>
</body>
</document>