Use xmlaccess.sh to provide or withdraw a portlet

You can provide portlets as WSRP services by using xmlaccess.sh.

To provide or withdraw the portlet using xmlaccess.sh, specify the provided attribute to the portlet tag:
provided = "true | false"


XML script examples: The following two XML samples show you how to use xmlaccess.sh 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. To withdraw a portlet by using xmlaccess.sh, specify false instead of true for the provided tag. Here and in the following sections and examples, IBM portlet has the following meaning:

  1. This portlet has been written according to the IBM portlet API.

  2. The IBM portlet API is the API version that applies to the Versions 4 and 5 of the IBM WebSphere Portal.

  3. This portlet does not comply with the standard portlet API (JSR 168 or later standards).


Provide 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>

Provide 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 the 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

Provide WSRP services as a Producer
xmlaccess.sh

 


+

Search Tips   |   Advanced Search