Showing posts with label configurewsrp. Show all posts
Showing posts with label configurewsrp. Show all posts

Configure Web Services for Remote Portlets (WSRP)

As i mentioned in the Web Services for Remote Portlet post, the WSRP architecture has two parts first you will have configure provider producer portlet and then consume it on the Target portal. Please follow these steps

Providing Producer Portlet


Please follow these steps to provider a portlet as WSRP service

  • Login into the producer portal and Go to Portal Administration console

  • Go to Portlet Management -> Portlet page. Now In the Manage Portlets portlet, select the portlet that you want to provide as WSRP service and click on the provide button of that portlet. Once you do that your portlet will be available as WSRP service from other portals




Consuming WSRP portlet


On the consumer portal server you will have to do two things first connect to the WSRP service of the producer and then create the proxy portlet for the portlet that you want to consume. Follow these steps to do that

  • Login into the consumer portal server and go to the portal administration console

  • Inside the Portal Admin Console go to Portlet Management -> Web Services. You will see Web Services Configuration Portlet like this click on the New Producer button


  • On the next screen it will ask you to configure a Producer, producer is nothing but URL pointing to services.wsdl file on the target portal server. I am pointing to same portal so i am using http://localhost:8080/wps/wsd/services.wsdl URL


  • Click next on next 2 screen to finish configuration and adding new producer

  • Once the connection is established its time to create actual proxy portlet. In the Portal Admin Console go to Portlet Management -> Web Modules screen. Now click on consume button


  • On the next screen it will list out all the producers that you have configured. In my case i had only one "Local Portla Server" producer. So click on that link


  • On the next screen it will display all the portlets that are published on Local server. In my case i have only one DijitTestPortlet so i selected it and said ok. This will create a local proxy to Dijit Portlet on my portal.




Once the proxy portlet is created you can use it as any other portlet on the consumer

Important Note You can use XMLAccess script to configure producer portal and create proxy portlets. It is useful in a situation when your producer portlet is down. The xmlaccess can still create local producer to it where as Admin portlet will check if the producer portlet is available on that URL if not it wont allow you to create producer for it. No matter how you configure it you need producer portal and portlet to be up and running in order to get WSRP working.

Web Services for Remote Portlets (WSRP) Architecture

Starting from Version 6.1 Portal Supports Web Services for Remote Portlets(WSRP 2.0). By using this one Portal can provide a portlet as WSRP service and other portal can integrate the WSRP service as remote portlets for their users.

Take a look at the diagram that defines the basic WSRP architecture.


The WSRP architecture can be divided into two basic parts one is producer portal, this the portal which will display your portlet to user. And consumer portal, this the portal where the portal code is deployed and executed.

The way it works is in the consumer portlet you mark particular portlet as WSRP provider, once you do that the WebSphere portal will make that portlet available as web service in addition to the normal way of adding portlet to page. Now on your consumer portal first you create a webservice connection to producer Portal server and once you create the connection, consumer portlet will display what all portlets are available as web service on producer, you choose one of them and portal will create a proxy for that portlet on the consumer. Once this proxy is created you can add it to any portal page as normal portlet.

Best part about this implementation is that you dont have to do any coding to either produce or consume portlet, portal takes care of converting your regular portlet into web service and also has generic stub portlet that can consume the web service.

Important NOteDepending on the API version of the provided portlet, the WSRP Producer provides the portlet in different WSRP protocol versions. JSR 168 portlets and IBM API portlets (also called IBM legacy portlets) are provided via both WSRP V 1.0 and V 2.0. JSR 286 portlets can be provided via WSRP V 2.0 only. The following table shows which provided portlets on a WSRP