Tuesday, September 11, 2012

Consume Portlets from WAS using WSRP

Now as we know we can deploy the portlets on WAS as it comes with portlet container here I will explain how the portlets deployed on WAS can be exposed from WAS as a web service and can be consumed by portal using WSRP.

Noe : WAS server used here is a standalone WAS 7 (server1) instance and not the one on which portal server runs over.

Now  if you look on of my older post it describes how you install the war file containing portlets on WAS so in this post I will assume that you are ready with that stuff.


So after installing the war files in the WAS we need to expose the portlets from was as a webservice for this we need to deploy a special EAR from IBM (Consider it as an out of box),this ear helps to expose the portlets from WAS as a webservice. (EAR file along with detailed PDF with instruction is available in backup email.)

Name of EAR (was.wsrp.producer.ear)

To access server1 admin console I used following url (https://localhost:9043/ibm/console/login.do?action=secure)

While deploying the EAR (In select deployment option page(i.e step1) you need to  check deploy as a webservice option in the checkbox)

After EAR is installed and started in WAS try to hit following url in browser you should be able see a wsdl

http://localhost:9080/producer/wsdl/wsrp_service.wsdl

Copy the above url and and log into the admin console of WebSphere portal where you want to consume the portlets from WAS

Go to webservice section in left panel of admin console
click new producer button

Fill the necessary details and  enter the wsdl url in the form and save it (if WAS server is remove localhost in the above url can be replaced with IP ).

Next step is you go to web modules section and click the consume button you should be able to see the newly created service

Lastly you can go to the portlets section search for the portlets with name installed in the WAS,you should be able to search the portlets and add them on the portal page.


Thus using above method we can consume the portlets deployed on WAS into the portal using WSRP

All the related material along with the PDF of instructions is available in backup email.


1 comment:

  1. backup email? I did not get this. Please let me know from where we can get the special ear and the pdf.

    ReplyDelete