Portal, Express Beta Version 6.1
Operating systems: i5/OS, Linux,Windows |
You can provide portlets as WSRP services by using the XML configuration interface.
To provide or withdraw the portlet using the XML configuration interface, specify the provided attribute to the portlet tag:
XML script examples: The following two XML samples show you how to use the XML configuration interface to provide a portlet that complies with the IBM portlet API and a portlet that complies with the standard portlet API. The examples show the provided attribute highlighted. If you want to withdraw a portlet by using the XML configuration interface, specify false instead of true for the provided tag.
Note: Here and in the following sections and examples, IBM portlet has the following meaning:Providing an IBM portlet: The first XML sample shows you how to provide a portlet that complies with the IBM portlet API:
<?xml version="1.0" encoding="UTF-8" ?> <request type="update" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"> <!-- Sample for providing a portlet as a WSRP producer. --> <portal action="locate"> <!-- uid must match uid attribute of portlet-app in portlet.xml --> <web-app action="locate" active="true" uid="com.ibm.wps.portlets.reminder"> <!-- uid must match uid attribute of concrete-portlet-app in portlet.xml --> <portlet-app action="update" uid="com.ibm.wps.portlets.reminder.1"> <!-- Name must match the content of the portlet-name subtag of concrete-portlet in portlet.xml. To actually provide the portlet, the provided attribute is set to true. --> <portlet action="update" name="Reminder" provided="true" /> </portlet-app> </web-app> </portal> </request>
Providing a standard API portlet: The following XML sample shows you how to provide a portlet that complies with the standard portlet API:
<?xml version="1.0" encoding="UTF-8" ?> <request type="update" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"> <!-- Sample for providing a standard API compliant portlet as a WSRP producer. Be aware that this sample is provided as a sample only. It might or might not work, depending on the configuration of your portal. --> <portal action="locate"> <!-- uid must match the uid of the portlet application appended with .webmod --> <web-app action="locate" active="true" uid="stdTestsuite.war.webmod"> <!-- uid must match the optional portlet-app id attribute from the portlet.xml. If this is not set, the .war file name must be supplied here. --> <portlet-app action="update" uid="stdTestsuite.war"> <!-- Name must match the portlet-name tag in the portlet.xml file. --> <portlet action="update" name="TestPortlet1" provided="true" /> </portlet-app> </web-app> </portal> </request>Parent topic: Providing WSRP services as a Producer