Creating a Producer definition and consuming a portlet by a single XML script | HCL Digital Experience

You can use a single XML script to create a Producer definition and then consume portlets from that same Producer.

About this task

If you consume the portlet in an XML script that has already created the Producer in a previous step, you must specify the following items in the XML script:

  1. A locate action on the Producer.
  2. A locate action on the web-app tag with the uid="" attribute.
  3. The servlet subtag with the remotehandle and wsrp-producerref attributes.
  4. A locate action on the portlet-app subtag with the uid="" attribute.
  5. The portlet subtag with the servletref attribute.

The following XML sample shows how you use the XML configuration interface to integrate a remote portlet:

<?xml version="1.0" encoding="UTF-8" ?>
<request type="update" xmlns:xsi="" 
   <portal action="locate">
      <wsrp-producer action="locate" objectid="Producer_OID" uniquename="wps.myProducer1">
      <web-app action="locate" uid="">
         <servlet action="update" objectid="Servlet_OID" remotehandle="Remote_handle" 
         <portlet-app action="locate" uid="">
            <portlet action="update" active="true" defaultlocale="en" 
               servletref="Servlet_OID" name="Sample_Portlet">
               <localedata locale="en">
                  <title>Sample Portlet</title>
                  <description>Simple sample portlet as Web service</description>
               <access-control externalized="false" owner="undefined" private="false"/>