Integrating WebSphere Portal Server and WebLogic Portal using by xumiaomaio


									WSRP Really Works! (Part 2 of 2)
By Matt Silver

A standard from OASIS called Web Services for Remote Portlets (WSRP) is used to
allow portlets to be decoupled from a portal. In the previous article, we introduced the
relevant standards ans specifications and then demonstrated WSRP’s capabilities by
consuming a WebSphere Portal portlet within WebLogic Portal.

In this second article, we explore the reverse scenario by illustrating WebSphere Portal
acting as the portlet consumer and WebLogic operating as the portlet producer.

Scenario 2: WebSphere Portal Acts as a Consumer and WebLogic
Portal Acts as a Producer

In order for WebSphere Portal to consume a WebLogic Portal portlet, several things need
to happen:

      WebLogic Portal
         o Functions as a producer
         o Offers (shares) the portlet
      WebSphere Portal
         o Functions as a consumer
         o Adds a remote producer
         o Creates a remote portlet
         o Adds the remote portlet to a page

Once again, WebSphere Portal and WebLogic Portal both function as consumers and
producers without requiring any special setup. However, the other steps still need to be

WebLogic Portal – Offer a Portlet
WebLogic Portal automatically allows portlets created using WebLogic for Workshop to
be shared. There is a property called Offer as Remote which is set to true by default.
Unfortunately, this property is not visible in the WebLogic Portal Administration
Console. However, below is a figure illustrating the property in WebLogic for

Consequently, there’s nothing you need to do to share the portlet. This is different from
the way WebSphere Portal behaves, where you have to explicitly share the portlet using
the administration console. Now it’s on to configuring the consumer.
WebSphere Portal - Add a Producer
Log onto WebSphere Portal (e.g., http://portalpc:10038/wps/portal). Click the Launch
button and select Administration to navigate to the WebSphere Portal Administration

Click the Web Services node underneath Portlet Management in the navigation bar.

Click the New Producer button in the Web Service Configuration administration

Unlike in WebLogic Portal, there is only one step involved in adding a producer. Enter a
Title for the producer, which serves as a label. In this case, input BEA WebLogic Portal
Server v9.2. Next, input the URL to WSDL service definitions. This URL points to the
WSDL document that contains information about the producer and how to connect to its
services. Specifically, it contains the URLs of the WSRP interfaces supported by the
provider. In the case of WebLogic Portal, the standard format for this URL is:

In our case, this URL translates to: http://portalpc:7001/BEAPortalWeb/producer?wsdl.
Enter this URL.

You’ll notice that there is a Registration handle text area inside the New Producer
page. Even though the WebSphere Portal Producer does not support registration, the
WebSphere Portal Consumer can accommodate other producers that do support the
registration interface. However, leave the field blank. You’ll see why in a moment.
Click OK to create the producer.

If WebSphere Portal is able to connect to WebLogic Portal, obtain its service description,
and register, a success message will be displayed at the top of the Web Service
Configuration portlet.

Click on the pencil (Edit this Producer) icon to the right of BEA WebLogic Portal
v9.2. Notice that the Registration handle, which we had previously left blank, is now
filled in with some value (e.g., 2005). The registration handle was created by WebLogic
Portal and passed back to WebSphere Portal during the registration process. Going
forward, WebSphere Portal needs to supply the registration handle whenever it interacts
with any WebLogic Portal, producer offered portlet (i.e., BEA Java Portlet). One of the
advantages of the registration handle is that if WebSphere Portal gets deregistered,
WebLogic Portal can delete any instances of the portlets allocated to WebSphere Portal,
thereby leading to better memory management.

WebSphere Portal - Create a Remote Portlet
Now it’s time to create a remote (proxy) portlet. The process is a bit different from
WebLogic’s. To do so, click the Web Modules node under Portlet Management in the
navigation bar.
Click the Consume button in the Manage Web Modules administrative portlet.

In step 1, you must select which producer you want to consume a portlet from. Click the
BEA WebLogic Portal v9.2 producer we just added.

In step 2, you must choose which portlet to consume. Check BEA Java Portlet.

Click OK. A message indicating the web module has been consumed should appear at
the top of the Manage Web Modules portlet.

If you want to see the corresponding web module that was just consumed, select File
name contains in the Search by drop-down menu. Type BEA in the Search field and
click the Search button. The module WSRP Producer (BEA WebLogic Portal v9.2)
Web Module will be listed, which indicates that the web module is a producer web
module associated with the BEA WebLogic Portal v9.2 producer we configured earlier.

If you want to see that a remote portlet was created, click on the Portlets node under
Portlet Management in the navigation bar. Select All remote portlets from the Search
by drop-down menu and click Search.

Notice that BEA Java Portlet is listed and that the Remote portlet column is checked.

WebSphere Portal - Add the Remote Portlet to a Page
Adding a remote portlet is just like adding a local portlet to a page. If you’re unfamiliar
with how to do so, refer to the WebSphere Portal 6.0 Information Center
In our case, we’ve added the local portlet to the left column and the remote portlet to the
right column.

Test the Portlets
Navigate to the home page for the portal by clicking on the Launch button and selecting
Home. Click the Page 1 tab to navigate to the page containing our two portlets.

Notice that the remote portlet, BEA Java Portlet, has the same look and feel as the local
portlet, IBM Java Portlet. The look and feel for a remote portlet can be modified the
same way as the look and feel for a local portlet.

Now try out the two portlets.

In the IBM Java Portlet (local portlet), notice that the address that you added earlier,
using the WebLogic Portal desktop, is listed.
Click on the Details link next to the address to see the details.

In the BEA Java Portlet (local portlet), input a message in the text box. Click the Update
Message button. The message should be echoed back inside the portlet.

Notice that the remote portlet behaves as we’d expect. This is what we want. It should
be transparent to the end user that the BEA Java Portlet is not hosted by the consumer.

In this article, we saw how to use WSRP 1.0 to create portals consisting of both local
portlets and remote portlets. We examined the reverse scenario from our pervious article,
with WebSphere Portal serving as a consumer and WebLogic Portal serving as a

We used each vendor’s portal administration console to configure a producer, create a
remote portlet, and add the remote portlet to a page. In the case of WebSphere Portal, we
also needed to explicitly share the portlet. WebLogic Portal shares all portlets created
using WebLogic for Workshop by default. We also tested the resulting portal pages and
saw that the remote portlets looked and acted like local portlets.

This article series demonstrates an important capability for many enterprises. The ability
to leverage information and capabilities via portal products in a diverse, multi-vendor
environment is increasingly important. With rapid growth, mergers and acquisitions, and
even just collaboration between business units, there is increasingly demand for master
information management. WSRP enables enterprises to move one step closer to robust
and seamless knowledge management.

      WSRP 1.0 Specification (http://www.oasis-
      BEA WebLogic 9.2 Federated Portals Guide
      WebSphere Portal 6.0 Information Center

Sample Code
      BEAPortalEAR.ear – contains the BEA Java Portlet
      IBMPortletWeb.war – contains the IBM Java Portlet

Matt Silver is a courseware developer and trainer, currently serving as a senior consultant
for Web Age Solutions.

To top