Building a Remote Portlet

Remote, or "proxy," portlets present content collected from WSRP-compliant producers. Remote portlets route requests from users to the appropriate Producers which, in turn process the request and send results back to the consumer. Consumers then aggregate the results coming from various producers and send the final result back to the user, who can view and use those results in remote portlets. Consumers have the ability to keep traffic separated and maintain all interactions private to that specific user during the interaction.

This procedure describes how to:

Before You Begin

Before you begin this procedure, you must have already created a domain, a portal application, and a portal project. If you haven't, please do so by using the procedures outlined in:

Creating the Portlet

To create a remote portlet, use this procedure:

  1. With WebLogic Workshop running, right-click the application that hosts the portal for which you are creating the portlet and right-click the portal application (alternately, select that application and select File>New>Portlet).
  2. Select New > Portlet.

(Alternately, open the File menu and select New > Portlet)

The New File window appears.

  1. On New File, do the following:
    1. In File name, replace "Untitled" with the name of the portlet (do not change the file extension, .portlet).

    2. If the portal project displayed in Create in: is not the project inwhich you want to create the portlet, click Browse to display the Select dialog box and select the desired project (optional)
    3. Click Create.

      The Portlet Wizard appears.

  1. Under Select Portlet Type, select Remote Portlet and click Next.

    The Portlet Wizard's Find Producer window appears:

    On this window, you can either specify the WSDL for the producer you want to use or select one from the drop-down list.

  2. Do one of the following:
  1. Click Register and do the following:

    NOTE: If registration is not required (Requires Registration: False) proceed to step 7.

  1. Click Next

    The Select Portlet from List window appears:

  2. Select the portlet you want to use. Note that when selected, details about that portlet appear in the Portlet Details panel:

  3. Click Next.

    The Proxy Portlet Details window appears:

  4. The window displays pertinent information about the portlet. If you want, you can change the name in Portlet Title to something more meaninful to your portal application; for example:

    The name will appear in the title bar of the portlet when it is rendered in the parent portal.

  5. Click Finish.
  6. The portlet will be created and appear as a placeholder in the IDE:

    Note the new portlet name in the title bar.

Adding the Portlet to a Portal

To add the remote portlet to a portal, do the following:

  1. In WebLogic Workshop, open the portal to which you want to add the portlet.
  2. Select the remote portlet from the list of portlets in the data palatte and drag it onto the portal workspace.
  3. Save the portal.

For more information on adding a portlet to a portal, please refer to Adding a Portlet to a Portal.

Viewing the Portlet

To test the new remote portlet, do the following:

  1. Add the remote portlet to a portal by dragging it into the portal workspace.
  2. Start WebLogic Server.
  3. In Workshop, open the Portal menu and select Open Current Portal.

    The portal will render in your browser and show the new remote portlet.

Related Topics

Enabling/Disabling a Portlet for Remote Consumption

Setting the Timeout on a Remote Portlet

Customizing a Remote Portlet