WebSphere Portal, Portlets and Web Services - nyu. · PDF fileWebSphere Portal, Portlets and...
Transcript of WebSphere Portal, Portlets and Web Services - nyu. · PDF fileWebSphere Portal, Portlets and...
1
WebSphere Portal, Portlets and Web Services
June 2002
Peter FischerDeveloper, WebSphere Portal Server
Portal ArchitectureIntroduction
2
3
What are Portals ?
Common access point to distributed information and applicationsTypical Functions:
User registrationAuthentication and AuthorizationPluggable portal components: PortletsPersonalization based on profiles / behaviorCustomization of pages by usersSearchContent Management
4
Example of a Portal View
3
5
LocalPortletLocalPortlet
Major Functional Components
Portlet Container
SOA
P
Aggregation
Customization
User Registration/Selfcare
Aut
hent
icat
ion
Aut
horiz
atio
nLocalPortletLocalPortletLocalPortlet
RemotePortlet
RemotePortlet
RemotePortlet
RemotePortlet
RemotePortletWeb
Services
UserInformation
PortletSettings
Portlet Inst.Data
User‘sSelections
PortletProxy
PortletRegistry
6
WebSphere Portal Quick Overview
Multi-Platform: Windows, AIX, Solaris Multi-Client: PCs, WAP, iModeMulti-Language: Serves different locales concurrentlyMulti-Authentication: Supports most relevant auth proxiesProvides well-defined Portlet API and portlet auto-deploymentMany Portlets on the IBM Portlet Marketplace (200+)
Portlets can exploit WebSphere web service functionsSupports pluggable, interactive, user-facing web servicesCan publish portlets as web services using admin UI
4
7
Portlet Services
Cred
entia
l Va
ult
Sear
ch
Cont
ent
Mgm
t
Internet Internet
WebSphere Portal Server Architecture
Portlet API
AggregationModules
(HTML, WML, VoiceXML, ...)
Remote Portlet Web ServicesSOAP Router
Authentication
Authorization
WebSpherePortal Server
Data Store
WebSphereMember
Subsystem
Local PortletsLocal
PortletsLocal
Portlets
Local PortletsLocal
PortletsPortletProxies
GlobalUDDI
Directory
Intranet Intranet
CorporateUDDI
Directory
J2EE/WebSphere APIs
JCA
Conn
ecto
rsEn
terp
rise J
ava
Bean
s
Mess
age
Bean
s
Local PortletsLocal
PortletsCorporate
Web Services
Local PortletsLocal
PortletsPublic
Web Services
Web Sphere Portal Server
Engine
...Site
An
alyze
r
PD WebSeal,WTE Seal,NetegritySiteminder,WebSphere Security, orothers via TAI
WPS Database,Policy Director, orNetegrity Siteminder
Secure Way LDAP, Domino LDAP, Netscape LDAP,Active Directory, or WMS DB
WPS DB or Tivoli Policy Director Vault
Intregrated Local Search (Juru)Domino Extended Search, EII.Third Parties
WPS Content OrganizerContent Integration Packs forThird Parties
DB2 or Oracle
Local PortletsLocal
PortletsPublic
RPWS Services
Local PortletsLocal
PortletsCorporate
RPWS Services
SOAPSOAP
RPWS / SOAP
Portlets and Portlet API
5
9
Portlets
Components designed to be aggregated in portalsAware of portal context
User profile informationPer-portlet instance data stored by portalPer-portlet settings managed by portalPortlet 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
10
Portlet Action Handling and Aggregation
Connectors
Web ServicesPortal
Servlet
LocalPortlet
LocalPortlet
LocalPortlet
Port
let A
PI (I
nvoc
atio
n)
Portlet API (context)
Serv
let A
PI
J2EE
API
s
Portal Infrastructure, User RegistryPersistent and Transient Portal State
EJBs
Action
Portlet Container
6
11
Example of a Stock Quote Portlet
Stock prices for user-selected list of stock symbols:VIEW mode shows stock prices: doView methodEDIT mode lets user change stocks: doEdit methodHELP mode explains the portlet: doHelp methodCONFIG mode lets administrator select stock quote source to use: doConfig method
12
Example of a PortletPortlets are specialized Servlets
public class StocksPortlet extends Portlet {public void init(PortletConfig config) {
... initialize portlet ...}public void doView(PortletRequest req,
PortletResponse rsp) throws PortletException, IOException {
... generate the portlet view ...}public void destroy(PortletConfig config) {
... destroy portlet ... }
}
7
13
Example of Portlet View ModeUse of PortletData, Beans and JSP™ components
public void doView(PortletRequest req, PortletResponse rsp)
throws PortletException, IOException {// Get stock symbols from portlet instance dataPortletData data = req.getData();String symb = (String) data.getAttribute("symbols");.. get prices for symbols from stocks service ..StockBean stockBean = new StockBean();.. put stock symbol/price pairs in stock bean ..req.setAttribute("stockBean", stockBean);getPortletConfig().getContext().include(
"/WEB-INF/ViewStockQuotes.jsp",req,rsp);}
14
Example of Portlet Edit Mode
Tie Actions to PortletURLs to process Formspublic void doEdit(PortletRequest req,
PortletResponse rsp) throws PortletException, IOException {
// Create URI pointing to this portlet instance// and attach a portlet actionPortletURI saveUri = rsp.createURI();PortletAction saveAction = new Action(SAVE);saveUri.addAction(saveAction);EditListBean editListBean = new EditListBean();.. put saveURI and other data into the bean .. req.setAttribute("editListBean", editListBean);getPortletConfig().getContext().include("/WEB-INF/EditSymbolListForm.jsp",req,rsp);
}
8
15
More Information about Portlet Developmentsee Portlet Development Guideavailable at the portal libraryhttp://www-3.ibm.com/software/webservers/portal/library.html
16
Java Portlet API (JSR 168)Defines interaction between portals and portletsDefines interfaces for interoperability of portals and portletsBased on the JavaTM Servlet APIProvides 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
9
17
Java Portlet API Supporters
AccentureApacheATGBEABoeingBorlandBowstreetCap Gemini Ernst & YoungCitrixDaimlerChryslerDocumentumEnformia LtdEpicentricFujitsuHewlett-PackardHitachi
IBM (Spec Lead)InterwovenMacromediaMcDonal BradleyPlumtreeSAP PortalsSilverstreamSybaseTarantella, IncVignetteIONASun (Spec Lead)Computer AssociatesPeoplesoftSASOracle
Portal WebServices
Remote Portlets
10
19
Web ServicesWeb services are platform and language independentDescription 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)
20
Service Oriented Architecture –Publish, Find & Bind
ServiceRequestor
ServiceProvider
ServiceRegistry
Find
Bind
Publish
11
21
„Traditional“ Web Service Usage Scenario
Portlets using data-oriented Web servicesDifferent data-oriented Web services expose different interfacesSpecialized UI and proxy code required in specific portletsLocal deployment of code is still necessary
Aggregation
Use
r‘s C
lient
Portlet 1(Presentation)
Portlet 2(Presentation)
Portlet API
Portlet APIServiceSpecificProxy 1
ServiceSpecificProxy 2
Web Service 1(Data only,
no Presentation)
WS specificinterface
Web Service 2(Data only,
no presentation)
WS specificinterface
22
Remote Portlets Web ServicesGeneric Proxies using user-facing web services
All RPWS services have a common APINo service specific portlets requiredGeneric RPWS proxy portlet is implemented once and used for all RPWS services
Aggregation
Use
r‘s C
lient
Portlet API
Portlet API
GenericProxy
GenericProxy
RPWS Service 1(includes data and
presentation)
RPWS Service 2(includes data and
presentation)
SOAP
SOAP
RPWSAPI
RPWSAPI
Presentation and Interaction Layer
12
23
Publishing Portlets as RPWS Services
Portal 1
Portal 2
PortletProxy
PortalAdministration
PortletRegistry
PortalAggregation
Portlet Proxy Entry
PortalAdministration
PortletRegistry
PortalAggregation
Portlet Entry
RemotePortlet
Portal 2
RPWS/SOAP
UDDIPortlet Entry
Portlet Entry
Portlet Entry
(1) Publish(2) Find & Bind
(3) Invoke
24
Remote Portlet Web Services GoalsAllow interactive, user-facing web services to be easilyplugged into all standards-compliant portalsLet anybody create and publish their content and applications as user-facing web servicesPortal administrators browse public or private UDDI directories for RPWS services to plug into their portals as new portlets, without any programming effortLet portals publish portlets so that they can be consumed by other portalsMake the internet a market of visual web services, waiting to be integrated
13
25
Business Scenario ExamplesTo 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)
26
Web Services for Remote Portals (WSRP)
Standardization taking place in OASIS WSRP TCChairman: Thomas SchaeckWSRP services are user-facing, interactive web services that may be aware of portal-side user profile information, devices, localesWSRP will standardize:
How to publish, find, and bind to WSRP servicesMetainformation for WSRP services (name, supported locales/markups, titles, and descriptions, ...)Protocol for interaction between portals and WSRP services
WSRP Home Page: http://oasis-open.org/committees/wsrp/Goal:
WSRP 1.0 Spec and Implementation year end 2002
14
27
Companies who participate in WSRP TC
BEABowstreetDivineEpicentricFactivaFrance TelecomFujitsuHPIBMInterwovenLexis-NexisLotusMoravia IT
NetegrityOraclePeoplesoftPlumtreeSilverstreamStellentSunSybaseTibcoWebCollageSAP PortalsSeeBeyond
28
How WSRP and Java Portlet API (JSR 168) fitPortlet API defines Java API for local portletsWSRP defines user-facing, interactive web services that plug & play with portalsGoals:
Allow Java portlets to be wrapped and published to UDDI as WSRP services Allow WSRP services to be integrated in portals by using genericportlet proxies
15
29
Portal consuming .NET-based RPWS Services
PortalServers IIS .NET
object
MicrosoftOffice as
OLE server
RPW
S
30
RPWS service inside a Word Document
PortalServers
.NETobject W
SRP