From version 6.5.1 of CMS Fiona, our Portal Manager is able to provide remote portlets from a WSRP producer. This can be done by means of a virtual context path that is specified in the Portal Manager. Such a virtual context path refers by means of an URL to a WSDL file (WSDL = Web Service Description Language) which describes how the service can be accessed.
Since remote portlets are made available in this way, they behave like
portlets of the Portal Manager and can be addressed using normal
npspm
-Syntax.
To make WSRP portlets available, please extend the
ProxyPortletContainer
bean located in the
webapps/PM/WEB-INF/pm.xml
configuration file of the CMS instance
concerned. Please add the wsrpPathMapping
property and a
value
subelement to the bean configuration. As the value of the
value
element specify for each WSRP producer a line containing
the virtual context path and the WSDL URL to be used. Example:
/WS-ORA = http://portalstandards.oracle.com/portletapp/portlets?WSDL
If the URL points to a WSDL file which contains references to external sources not available for some reason (firewall access restrictions, for example), please
download the WSDL file and make the reference point to its path in the local file system using file:///
. Example:
/WS-IBM = file:///var/temp/portalserver-ibm.wsdl
The following is a sample excerpt from the pm.xml
file:
<bean id="portletContainer" class="com.infopark.pm.portlet.ProxyPortletContainer"> <property name="preferencesStorage"> <bean class="com.infopark.pm.FilesystemPreferencesStorage" /> </property> <property name="cacheManager" ref="cacheManager" /> <property name="wsrpPathMapping"> <value> /WS-ORA = http://portalstandards.oracle.com/portletapp/portlets?WSDL /WS-IBM = file:///var/temp/portalserver-ibm.wsdl </value> </property> <property name="webserviceRefreshInterval" value="0" /> </bean>
Changes to the configuration must be completed by restarting the Application Server. If the Portal Manager and the Producer are able to communicate with each other, the handles of the portlets can then be retrieved using the following URL:
http://my.server:8080/PM/debug/
Once a portlet has been identified, it can be embedded into the content analogously to
the following example, whereby portletHandle
refers to the handle
of the portlet to be included:
<npspm includeportlet="/WS-ORA/portletHandle" />
Other Properties
webserviceRefreshInterval
: The interval for updating the list of
the remote portlets (in seconds).
The WSDL file describing the WSRP service normally contains references to
schemes or name spaces located on internet servers, for example
http://www.oasis-open.org/committees/wsrp/specifications/version1/wsrp_v1_bindings.wsdl
,
http://www.w3.org/XML/1998/namespace
). If your network
configuration prevents the Portal Manager from connecting via HTTP/HTTPS
to servers outside the intranet or the DMZ, the targets of the references
need to be made available differently because the consumer requires the
complete description of the remote services. For this, the following methods
can be used:
If your network policy permits the Portal Manager to connect to the internet
and to the producer via a proxy server, you might want to start the Application
Server running the Portal Manager with the proxyHost
and
proxyPort
Java options.
If you use the Trifork Server, these options can be added to the
rc.npsd.conf
configuration file located in the bin
directory of
the CMS instance concerned. Example:
set conf(triforkArgs) [list server start -devel -vmargs=-server\ -vmargs=-Xmx256m -vmargs=-Xms256m\ -vmargs=-XX:MaxPermSize=128m -DproxyHost=mein.server \ -DproxyPort=3128]
Please note that this permits all applications to connect to the internet via the proxy server.
Configure your producer in such a way that it only includes XML files available locally, or adapt the WSDL file accordingly. The references in the WSDL file can then be resolved by means of requests to the producer.
If changes cannot be made to the producer, the WSDL file and all the XML files it includes can be made available locally. This is the least flexible method because changes to the producer always need to be reconstructed locally.
To do this, please use a browser to get the WSDL file via its URL and save it to your
local file system. Then edit this file and replace all import
s from external
web servers with references to local files, meaning that you need to download all the
external references. Repeat this for all downloaded files until all external references
are available locally and are included instead of their remote counterparts. Place all
the files into a single directory of the application server and configure this producer's
wsrpPathMapping
in the pm.xml
as a local WSDL file.