Web Sphere Portal Portlets and Web Services June
Web. Sphere Portal, Portlets and Web Services June 2002 Peter Fischer Developer, Web. Sphere Portal Server
Portal Architecture Introduction
What are Portals ? § Common access point to distributed information and applications § Typical Functions: Ø Ø Ø Ø User registration Authentication and Authorization Pluggable portal components: Portlets Personalization based on profiles / behavior Customization of pages by users Search Content Management 3
Example of a Portal View § 4
Major Functional Components User Registration/ Selfcare User Information Aggregation User‘s Selections Portlet Registry Local Portlet Proxy Local Portlet Settings Portlet Inst. Data 5 SOAP Customization Authorization Authentication Portlet Container Remote Portlet Remote Web Portlet Services
Web. Sphere Portal Quick Overview § § Multi-Platform: Windows, AIX, Solaris Multi-Client: PCs, WAP, i. Mode Multi-Language: Serves different locales concurrently Multi-Authentication: Supports most relevant auth proxies § Provides well-defined Portlet API and portlet autodeployment § Many Portlets on the IBM Portlet Marketplace (200+) § Portlets can exploit Web. Sphere web service functions § Supports pluggable, interactive, user-facing web services § Can publish portlets as 6 web services using admin
Web. Sphere Portal Server Architecture WPS Database, Policy Director, or Netegrity Siteminder Web Sphere Portal Server Engine Intranet Local Corporate Local Portlets RPWS Portlets Services 7 Internet Site Analyzer DB 2 or Oracle Secure Way LDAP, Domino LDAP, Netscape LDAP, Active Directory, or WMS DB Search JCA Connectors Enterprise Java Beans Message Beans Web. Spher e Portal Server Data Store Local Public Local Portlets RPWS Portlets Services Local Public Local Portlets Web Portlets Services S O A P Web. Spher e Member Subsystem Local Portlets J 2 Portlets Proxies EE /W eb Sp he re AP Is Local Corporate Local Portlets Web Portlets Services S O A P Por tlet Ser vic es Local Portlets Corporate UDDI Directory R P W S / S O A P PD Web. Seal, WTE Seal, Netegrity Siteminder, Web. Sphere Security, or others via TAI Third Parties P o r t l e t A P I Authentication Authorizatio n Aggregation Modules (HTML, WML, Voice. XML, . . . ) Remote Portlet Web Services SOAP Router Director Vault Content Mgmt Credential Vault Intregrated Local Search (Juru) WPS Content Organizer Domino Extended Search, EII. WPS DB or Tivoli. Content Integration Packs Thirdfor Parties Policy . . . Global UDDI Directory
Portlets and Portlet API
Portlets § Components designed to be aggregated in portals § Aware of portal context Ø Ø Ø User profile information Per-portlet instance data stored by portal Per-portlet settings managed by portal Portlet window state (NORMAL, MIN, MAX) Portlet modes (VIEW, EDIT, CONF, HELP) Portlet events (action / message events) § Can be packaged in normal WAR Files with descriptor extensions 9
Portlet Container Action Local Portlet API (context) Portal Infrastructure, User Registry Persistent and Transient Portal State 10 J 2 EE APIs Portal Servlet Portlet API (Invocation) Servlet API Portlet Action Handling and Aggregation Connectors Web Services EJBs
Example of a Stock Quote Portlet § Stock prices for user-selected list of stock symbols: VIEW mode shows stock prices: do. View method Ø EDIT mode lets user change stocks: do. Edit method Ø HELP mode explains the portlet: do. Help method Ø CONFIG mode lets administrator select stock quote source to use: do. Config method Ø 11
Example of a Portlet § Portlets are specialized Servlets public class Stocks. Portlet extends Portlet { public void init(Portlet. Config config) {. . . initialize portlet. . . } public void do. View(Portlet. Request req, Portlet. Response rsp) throws Portlet. Exception, IOException {. . . generate the portlet view. . . } } public void destroy(Portlet. Config config) {. . . destroy portlet. . . } 12
Example of Portlet View Mode § Use of Portlet. Data, Beans and JSP™ public void do. View(Portlet. Request req, components Portlet. Response rsp) throws Portlet. Exception, IOException { // Get stock symbols from portlet instance data Portlet. Data data = req. get. Data(); String symb = (String) data. get. Attribute("symbols"); . . get prices for symbols from stocks service. . Stock. Bean stock. Bean = new Stock. Bean(); . . put stock symbol/price pairs in stock bean. . req. set. Attribute("stock. Bean", stock. Bean); } get. Portlet. Config(). get. Context(). include( "/WEB-INF/View. Stock. Quotes. jsp", req, rsp); 13
Example of Portlet Edit Mode § Tie Actions to Portlet. URLs to process Forms public void do. Edit(Portlet. Request req, Portlet. Response rsp) throws Portlet. Exception, IOException { // Create URI pointing to this portlet instance // and attach a portlet action Portlet. URI save. Uri = rsp. create. URI(); Portlet. Action save. Action = new Action(SAVE); save. Uri. add. Action(save. Action); Edit. List. Bean edit. List. Bean = new Edit. List. Bean(); . . put save. URI and other data into the bean. . req. set. Attribute("edit. List. Bean", edit. List. Bean); } get. Portlet. Config(). get. Context(). include( "/WEB-INF/Edit. Symbol. List. Form. jsp", req, rsp); 14
More Information about Portlet Development § see Portlet Development Guide available at the portal library http: //www 3. ibm. com/software/webservers/portal/library. html 15
Java Portlet API (JSR 168) § Defines interaction between portals and portlets § Defines interfaces for interoperability of portals and portlets § Based on the Java. TM Servlet API § Provides additional abstractions for portal context Ø user object, persistent data objects, device information, portlet modes, window states, . . . § Standardization in JSR 168 lead by IBM and Sun (see http: //jcp. org/jsr/detail/168. jsp) § A Portlet API reference implementation will be donated to Apache Open Source Community 16
Java Portlet API Supporters § § § § Accenture Apache ATG BEA Boeing Borland Bowstreet Cap Gemini Ernst & Young Citrix Daimler. Chrysler Documentum Enformia Ltd Epicentric Fujitsu Hewlett-Packard Hitachi 17 § § § § IBM (Spec Lead) Interwoven Macromedia Mc. Donal Bradley Plumtree SAP Portals Silverstream Sybase Tarantella, Inc Vignette IONA Sun (Spec Lead) Computer Associates Peoplesoft SAS Oracle
Portal Web. Services Remote Portlets
Web Services § Web services are platform and language independent § Description of Web services in WSDL (Web Services Description Language) § Invocation of Web services via SOAP (Simple Object Access Protocol) § Publish & Find through UDDI (Universal Description, Discovery & Integration) 19
Service Oriented Architecture – Publish, Find & Bind Service Registry Find Publish Service Requestor Bind 20 Service Provider
„Traditional“ Web Service Usage Scenario § Portlets using data-oriented Web services Different data-oriented Web services expose different interfaces Ø Specialized UI and proxy code required in specific portlets Ø Local deployment of code is still necessary Ø WS specific interface User‘s Client Portlet API Portlet 1 (Presentation) Service Specific Proxy 1 Web Service 1 (Data only, no Presentation) Portlet 2 (Presentation) Service Specific Proxy 2 Web Service 2 (Data only, no presentation) Aggregation Portlet API WS specific interface 21
Remote Portlets Web Services § Generic Proxies using user-facing web services All RPWS services have a common API Ø No service specific portlets required Ø Generic RPWS proxy portlet is implemented Presentation and Interaction Layer once and used for all RPWS services Ø User‘s Client Portlet API SOAP Generic Proxy RPWS API Aggregation SOAP Generic Proxy RPWS API Portlet API 22 RPWS Service 1 (includes data and presentation) RPWS Service 2 (includes data and presentation)
Publishing Portlets as RPWS Services (2) Find & Bind Portal 2 Portal Aggregation (1) Publish Portal 1 Portlet Entry Portal Administration Portlet Registry UDDI Portlet Entry Portal Administration Portal 2 Portlet Entry Portlet Proxy RPWS/ SOAP (3) Invoke 23 Remote Portlet Registry Portal Aggregation
Remote Portlet Web Services Goals § Allow interactive, user-facing web services to be easily plugged into all standardscompliant portals § Let anybody create and publish their content and applications as user-facing web services § Portal administrators browse public or private UDDI directories for RPWS services to plug into their portals as new portlets, without any programming effort § Let portals publish portlets so that they can be consumed by other portals § Make the internet a market of visual web services, waiting to be integrated 24
Business Scenario Examples To plug into portals. . . §. . . Content Providers publish content as RPWS services (e. g. Stock Quotes, News, Lottery Numbers, Sports Results, Flight Schedules, . . . ) §. . . Application providers expose apps as RPWS services (e. g. Stock Option Programs, E-Mail, Calendar, CRM, Workflow, Tax Calculation, Ticket Ordering, Travel Booking, . . . ) §. . . Portal providers publish local portlets as RPWS services to share them with other portals (e. g. a content provider‘s portal might publish its portlets for re-use in employee portals of different companies) 25
Web Services for Remote Portals (WSRP) § Standardization taking place in OASIS WSRP TC Chairman: Thomas Schaeck § WSRP services are user-facing, interactive web services that may be aware of portal-side user profile information, devices, locales § WSRP will standardize: How to publish, find, and bind to WSRP services Ø Metainformation for WSRP services (name, supported locales/markups, titles, and descriptions, . . . ) Ø Protocol for interaction between portals and WSRP services Ø § WSRP Home Page: http: //oasisopen. org/committees/wsrp/ § Goal: Ø WSRP 1. 0 Spec and Implementation year end 2002 26
Companies who participate in WSRP TC § § § § § § § BEA Bowstreet Divine Epicentric Factiva France Telecom Fujitsu HP IBM Interwoven Lexis-Nexis Lotus Moravia IT 27 Netegrity Oracle Peoplesoft Plumtree Silverstream Stellent Sun Sybase Tibco Web. Collage SAP Portals See. Beyond
How WSRP and Java Portlet API (JSR 168) fit § Portlet API defines Java API for local portlets § WSRP defines user-facing, interactive web services that plug & play with portals § Goals: Allow Java portlets to be wrapped and published to UDDI as WSRP services Ø Allow WSRP services to be integrated in portals by using generic portlet proxies Ø 28
Portal consuming. NET-based RPWS Services RPWS Microsoft Office as OLE server Portal Servers 29 IIS . NET object
WSRP RPWS service inside a Word Document . NET object 30 Portal Servers
Thank you !
- Slides: 31