580 likes | 797 Views
WSRP in uPortal. Ken Weiner, UNICON, Inc. Introduction to WSRP WSRP’s role in uPortal WSRP Interfaces WSRP Concepts WSRP Channel Type WSRP/uPortal Roadmap. Overview.
E N D
WSRP in uPortal Ken Weiner, UNICON, Inc.
Introduction to WSRP WSRP’s role in uPortal WSRP Interfaces WSRP Concepts WSRP Channel Type WSRP/uPortal Roadmap Overview
We need an easy way to assemble visual, interactive Web applications with no programming while retaining a cohesive flow and common look-and-feel. Why WSRP ?
Leading to WSRP… • Web Services User Interface (WSUI) – Epicentric • Web Service eXperience Language (WSXL) – IBM • Interactive Web Services – WebCollage • Remote uPortal Channels – IBS and LAT
WSRP Working Group Application server vendors Portal vendors Application integration vendors Enterprise application providers
OASIS Technical Committees WSIA: Web Services for Interactive Applications http://www.oasis-open.org/committees/wsia/ WSRP: Web Services for Remote Portals http://www.oasis-open.org/committees/wsrp/ A Joint effort
To develop a web services standard that will allow for the plug-n-play of Portlets To enable an application administrator to pick from a rich choice of compliant remote content and application providers, and integrate them with just a few mouse clicks and no programming effort WSRP Goals
Data-oriented vs. Presentation-oriented WS WSRP Web Service Typical Data Web Service Business logic (JavaXML) Business logic (JavaXML) WSDL Presentation logic (XSLT) WSDL <courses> <course>…</course> <course>…</course> </courses> XML SOAP HTML Business logic (JavaXML) Presentation logic (XSLT) SOAP
Web Services for Remote Portlets (WSRP) • WSRP will define • WSDL interface description for invocation of WSRP services • How to Publish, Find, Bind WSRP services • Markup Fragment Rules for markup emitted by WSRP services • Developed by • Organization of the Advancement of Structured Information Standards (OASIS) • Current spec • 1.0, July 14, 2003
Producer Provides a Portlet as a presentation-oriented web service Consumer Consumes a Portlet as a presentation-oriented web service End-Users Clients to Consumers WSRP Actors
WSRP/uPortal Scenarios Consumer/Producer Consumer Producer WSRP WSRP WSRP SOAP WSRP SOAP Producer WSRP WSRP SOAP WSRP SOAP Consumer WSRP SOAP Swing
WSRP Data Flow Producer Consumer User Describeservice getServiceDescription() Generatemarkup getMarkup() Views page getMarkup() Clicks link orsubmits form Changestate performBlockingInteraction() Freeresources releaseSessions() Logs out
Service description [required] Queries the “capabilities” of the Producer Markup [required] Request/interact with markup fragments Registration [optional] Consumer registers with Producer Portlet management [optional] Grants access to clone and customize Portlets WSRP Interfaces
Extension, Handle, Key, ID, LocaledString, ResourceValue, Resource, ResourceList, ItemDescription, MarkupType, PortletDescription, Property, ResetProperty, PropertyList, PrepertyDescription, ModelTypes, ModelDescription, CookieProtocol, ServiceDescription, RegistrationState, RegistrationContext Service Description Data Structures
getServiceDescription() Service Description Operations
getServiceDescription() Parameters: RegistrationContext, desiredLocales Returns: ServiceDescription Faults: InvalidRegistration, OperationFailed Service Description Operations, Details
SessionContext, RuntimeContext, PortletContext, CacheControl, Templates, ClientData, NamedString, MarkupParams, MarkupContext, MarkupResponse, UpdateResponse, BlockingInteractionResponse, StateChange, UploadContext, InteractionParams, UserProfile, UserContext Markup Data Structures
getMarkup() initCookie() releaseSessions() Markup Operations
getMarkup() Parameters: RegistrationContext, PortletContext, RuntimeContext, UserContext, MarkupParams Returns: MarkupResponse, SessionContext Faults: AccessDenied, InconsistantParameters, InvalidRegistration, MissingParameters, OperationFailed, InvalidUserCategory, InvalidHandle, InvalidCookie, InvalidSession, UnsupportedMode, UnsupportedWindowState, UnsupportedLocale, UnsupportedMimeType Markup Operations, Details
initCookie() Parameters: RegistrationContext Returns: N/A Faults: AccessDenied, InvalidRegistration, OperationFailed Markup Operations, Details
releaseSessions() Parameters: RegistrationContext, sessionIDs Returns: N/A Faults: AccessDenied, InvalidRegistration, MissingParameters, OperationFailed Markup Operations, Details
RegistrationData Registration Data Structures
register() modifyRegistration() deregister() Registration Operations
register() Parameters: RegistrationData Returns: RegistrationContext Faults: MissingParameters, OperationFailed Registration Operations, Details
modifyRegistration() Parameters: RegistrationContext, RegistrationData Returns: RegistrationState Faults: InvalidRegistration, MissingParameters, OperationFailed Registration Operations, Details
deregister() Parameters: RegistrationContext Returns: N/A Faults: InvalidRegistration, OperationFailed Registration Operations, Details
DestroyFailed, DestroyPortletsResponse, PortletDescriptionResponse, PortletPropertyDescriptionResponse Portlet Management Data Structures
getPortletDescription() clonePortlet() destroyPortlets() setPortletProperties() getPortletProperties() getPortletPropertyDescription() Portlet Management Operations
getPortletDescription() Parameters: RegistrationContext, PortletContext, UserContext, desiredLocales Returns: PortletDescriptionResponse Faults: AccessDenied, InconsistantParameters, InvalidRegistration, MissingParameters, OperationFailed, InvalidUserCategory, InvalidHandle Portlet Management Operations, Details
clonePortlet () Parameters: RegistrationContext, PortletContext, UserContext Returns: PortletContext Faults: AccessDenied, InconsistantParameters, InvalidRegistration, MissingParameters, OperationFailed, InvalidUserCategory, InvalidHandle Portlet Management Operations, Details
destroyPortlets() Parameters: RegistrationContext, portletHandles Returns: DestroyPortletsResponse Faults: InconsistantParameters, InvalidRegistration, MissingParameters, OperationFailed Portlet Management Operations, Details
setPortletProperties() Parameters: RegistrationContext, PortletContext, UserContext, PropertyList Returns: PortletContext Faults: AccessDenied, InconsistantParameters, InvalidRegistration, MissingParameters, OperationFailed, InvalidUserCategory, InvalidHandle Portlet Management Operations, Details
getPortletProperties() Parameters: RegistrationContext, PortletContext, UserContext, names Returns: PropertyList Faults: AccessDenied, InconsistantParameters, InvalidRegistration, MissingParameters, OperationFailed, InvalidUserCategory, InvalidHandle Portlet Management Operations, Details
getPortletPropertyDescription() Parameters: RegistrationContext, PortletContext, UserContext, desiredLocales Returns: PortletPropertyDescriptionResponse Faults: AccessDenied, InconsistantParameters, InvalidRegistration, MissingParameters, OperationFailed, InvalidUserCategory, InvalidHandle Portlet Management Operations, Details
Stateful Portlet Scenarios Modes Window States URL Considerations Markup Fragment Rules CSS Style Definitions Caching Security User Information User Categories WSRP Concepts
No state Information on URL determines state Typically a single-page Portlet Navigational state only Portlet does not maintain state at the Producer Portlet passes navigationState token to Consumer Local state Portlet maintains state on the Producer. Typically involves session ID. Can also involve navigationalState token Stateful Portlet Scenarios
How Consumer manages interaction with End-User Consumer indicates to Portlet the current mode, Portlet may request a mode change Standard modes wsrp:view [required] Render markup reflecting current state of Portlet wsrp:edit Customization of Portlet wsrp:help Explanation of Portlet and its usage wsrp:preview Visual sample of how Portlet will appear on page Custom modes are permitted Modes
Indicate amount of page space assigned to Portlet’s content Consumer indicates to Portlet the current window state, Portlet may request a window state change Standard window states wsrp-normal [required] Sharing aggregated page with other Portlets wsrp-minimized Portlet should not render visible markup wsrp-maximized Portlet has more space that other Portlets wsrp-solo Portlet is the only Portlet to be rendered on the page Custom window states are permitted Window States
Portlet URLs need to target Portlets Users interact with Consumers, not Producers Consumer URL Rewriting Producer defines URL templates with replaceable tokens Producer URL Rewriting Consumer defines URL templates with replaceable tokens URL Considerations
Producer declares URL template wsrp_rewrite?wsrp-urlType=value&name=1=value1&name2=value2…/wsrp_rewrite Parameter name choices wsrp-urlType wsrp-navigationalState wsrp-interactionState wsrp-mode wsrp-windowState wsrp-fragmentID wsrp-secureURL Example Request that Consumer changes the Portlet window state wsrp_rewrite?wsrp-urlType=render&wsrp-windowState=maximized/wsrp_rewrite Consumer URL Rewriting
Consumer declares URL template http://www.consumer.com/path/{wsrp-urlType}?mode={wsrp-mode}&... Parameter name choices All the ones for Consumer URL Rewriting plus... wsrp-portletHandle wsrp-userContextKey wsrp-portletInstanceKey wsrp-sessionID Example Request that Consumer changes the Portlet window state http://www.consumer.com/path/{wsrp-urlType}?portletEvent={wsrp-mode} Producer URL Rewriting
Certain markup tags should be left out of a markup fragment emitted by a portlet HTML and XHTML Disallowed <html>, <head>, <title>, <body>, <frameset>, <frame> Not recommended <base>, <link>, <meta>, <style> Markup Fragment Rules
A standard set of CSS style definitions are needed so that aggregated Portlets retain a common look and feel on a page Fonts portlet-font, portlet-font-dim Messages portlet-msg-status, portlet-msg-info, portlet-msg-error, etc. Sections portlet-section-header, portlet-section-body, portlet-section-alternate, etc. Tables portlet-table-header, portlet-table-body, portlet-table-selected, etc. Forms portlet-form-label, portlet-form-input-field, portlet-form-button, etc. Menus portlet-menu, portlet-menu-item, portlet-menu-caption, etc. CSS Style Definitions
CSS Style Example .portlet-form-label .portlet-form-field Favorite color .portlet-form-input-field .portlet-form-field-label Blue Green Red Pink Other color: .portlet-form-button Submit
WSRP Specification 1.0, Section 9 “For this version of the specification, emphasis is placed on using transport-level security standards (e.g. SSL/TLS) to address the security issues involved in Consumers invoking Producers on behalf of End-Users.” Producer declares an https endpoint in WSDL Consumer lets Producer know if End-User is communicating securely Security
Standard set of user attribute aliases mapped to local attributes uPortal EduPerson 1.0 Examples sn givenName homePostalAddress WSRP P3P User Data Examples name/family name/given homeInfo/postal/street User Identity – defer to other specifications SAML WS-Security User Information
A Producer declares which User Categories it supports A Consumer declares which User Categories it supports Usage of these categories is optional for both Consumer and Producer Standard User Categories wsrp:full Users can use full functionality of Portlet wsrp:standard Users may customize some set of properties for Portlet wsrp:minimal Users may view a Portlet, but not modify its properties User Categories
Channel org.jasig.portal.channels.wsrp.CConsumer WSDL Service Locator org.jasig.portal.wsrp.wsdl.* Interfaces org.jasig.portal.wsrp.intf.* Bindings (client stubs) org.jasig.portal.wsrp.bind.* Data Structures org.jasig.portal.wsrp.types.* uPortal WSRP Consumer Code
Web application deployment descriptor web.xml Deployed web services server-config.wsdd Bindings (server skeletons) org.jasig.portal.wsrp.bind.* Data Structures org.jasig.portal.wsrp.types.* uPortal WSRP Producer Code