| By Matt Silver | Article Rating: |
|
| March 27, 2008 11:00 AM EDT | Reads: |
8,219 |
Portlet, WSRP and JSR-168 Overview
Portals are comprised of portlets that get aggregated together onto a web page. A portlet, which functions as an application, occupies a rectangular region on a page. It is analogous to a desktop application. Portlets, like desktop applications, can be maximized or minimized. It runs inside of a portal server, which is used to manage the lifecycle of a portlet and invoke its methods. It can be written in many different languages, although Java and C# are the most common.
WSRP
Web Services for Remote Portlets (WSRP) defines a standard set of Web Service interfaces that allows a portal server to access interactive, presentation-oriented Web Services. That is, a portal server wraps one or more of its portlets using a Web Service interface and makes the interface available to other portal servers. This leads to federated portals, where a portal can consist of a combination of local and remote resources. One of the primary benefits of WSRP is that it reduces the cost of deployments, since changes to a portlet on a remote server are automatically picked up by a client server, without redeploying the client's portal application.
A WSRP Web Service isn't your garden variety Web Service, which is purely data-oriented. Normally, a client application invokes a Web Service operation and gets some data back. It's the responsibility of the client to render the data as it sees fit. On the other hand, a WSRP Web Service is presentation-oriented. This means the Web Service includes both application logic and business logic. Furthermore, it means that rendered data, representing a portlet, is returned as markup. Consequently, it's no longer the responsibility of the client to do the rendering. Hence, WSRP leads to a more plug-and-play solution than traditional Web Services.
WSRP Actors
WSRP defines three actors, two of which we normally use when describing the Web Service architecture: (See Figure 1)
- Producer - A provider of portlets that are to be shared
- Consumer - A user of a shared portlet. Aggregates the portlets from one or more Producers and serves them to an End User.
- End User - A portal user. Interacts with a Consumer.
Before we move on to the meat of this article, it's important to get our terminology straight. A portlet that is shared by a producer is referred to as a producer-offered portlet. Producer-offered portlets are pre-configured and can't be changed by a consumer.
The consumer uses proxy code to communicate with a producer. Vendors normally refer to the proxy code as a proxy or remote portlet. For those familiar with distributed object computing (e.g., CORBA, DCOM, RMI, EJB), a proxy portlet is analogous to a stub. The portlet referenced by the proxy portlet is analogous to a remote object. The stub serves as a proxy, or a fill-in, for the remote object.
WSRP Producer Interfaces
A producer provides a set of Web Service interfaces for the portlets it provides, two of which are mandatory and two of which are optional:
- Service Description - A required interface that allows a consumer to obtain metadata about the producer, including a description of all of the producer-offered portlets.
- Markup - A required interface used to request markup fragments for a producer-offered portlet and interact with that markup.
- Registration - An optional interface that lets a producer keep track of its consumers. If a producer supports this interface, a consumer must register with a producer first before it can discover and access any of its portlets. After registering a consumer, a provider supplies the consumer with a unique identifier (registration handle) that it must pass back to the producer for any subsequent requests. If a consumer is deregistered, the producer can remove all instances of the portlets used by that consumer, leading to better memory management.
- Portlet Management - An optional interface that provides the consumer with access to the lifecycle of the producer offered portlets and their persistent state. Specifically, it lets a consumer get portlet metadata, clone portlets for customization purposes, and retrieve/update the portlet's properties (e.g., modify portlet preferences).
As mentioned, WSRP is platform- and language-independent. Consequently, it can be used to integrate portlets using .NET, Java, or some other technology. In our case, we'll focus on portlets written using Java, specifically JSR-168.
Otherwise known as the Java Portlet Specification, JSR-168 allows for the creation of portable portlets. Portlets written to this specification are often referred to as standard portlets and can run inside of any JSR-168-compliant portal server. Both WebSphere Portal and WebLogic Portal support JSR-168 (this will soon be supplanted by JSR-286, which is essentially version 2.0 of JSR-168).
Integrating WebLogic and WebSphere Tutorial
Next, I'll demonstrate how to configure WebLogic Portal and WebSphere Portal, two popular portal server products, to communicate using WSRP. I'm using WebSphere Portal 6.0 and WebLogic Portal 9.2, although both vendors support WSRP 1.0 in prior versions of their products too. The latest version of WSRP is version 2.0.
Here I'll focus on the first of two scenarios:
- WebLogic Portal acts as a consumer and WebSphere Portal acts as a producer
- WebSphere Portal acts as a consumer and WebLogic Portal acts as a producer
Published March 27, 2008 Reads 8,219
Copyright © 2008 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Matt Silver
Matt Silver is a courseware developer and trainer, currently serving as a senior consultant for Web Age Solutions.
![]() |
ambujsaxena 08/26/08 05:57:01 AM EDT | |||
Hi Matt, I have some problem with retrieving the producer, when i am entering the wsdl of my service(https) which is in WSRP and hosted on IIS, then its saying unable to retrieve producer. |
||||
- Kindle 2 vs Nook
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- Confessions of a Ulitzer Addict
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- It's the Java vs. C++ Shootout Revisited!
- Cloud Computing Can Revitalize Your Career as Software Developer
- IBM Could "Reinvent" Java: Mills
- Oracle & Cloud Computing: Exclusive Q&A with SVP Richard Sarwal
- A Brief History of Cloud Computing
- Kindle 2 vs Nook
- Cloud CEOs, CTOs & SVPs to Speak at 4th International Cloud Computing Expo
- Why IBM’s Server Chief Got Busted
- Is Cloud Computing Like Teenage Sex?
- Industry Experts Discuss the State of Cloud Computing
- Performance Tuning Essentials for Java
- The Difference Between Web Hosting and Cloud Computing
- Cloud Computing Expo: Exclusive Q&A with Yahoo! SVP Cloud Computing
- Ajax in RichFaces 3.3, JSF 2 and RichFaces 4
- Confessions of a Ulitzer Addict
- My Thoughts on Ulitzer
- Tactical Cloud Computing Panel at 1st Annual GovIT Expo
- A Cup of AJAX? Nay, Just Regular Java Please
- Java Developer's Journal Exclusive: 2006 "JDJ Editors' Choice" Awards
- The i-Technology Right Stuff
- JavaServer Faces (JSF) vs Struts
- Rich Internet Applications with Adobe Flex 2 and Java
- Java vs C++ "Shootout" Revisited
- Bean-Managed Persistence Using a Proxy List
- Reporting Made Easy with JasperReports and Hibernate
- Creating a Pet Store Application with JavaServer Faces, Spring, and Hibernate
- What's New in Eclipse?
- Why Do 'Cool Kids' Choose Ruby or PHP to Build Websites Instead of Java?
- i-Technology Predictions for 2007: Where's It All Headed?


































