100 likes | 244 Vues
WS-CAF Demo. A Demonstration of WS-CTX. WS-CAF In A Nutshell. Collection of 3 specifications WS-Context, WS-Coordination Framework and WS-Transaction Management Designed to be used independently or together
E N D
WS-CAF Demo A Demonstration of WS-CTX
WS-CAF In A Nutshell • Collection of 3 specifications • WS-Context, WS-Coordination Framework and WS-Transaction Management • Designed to be used independently or together • An open framework providing infrastructure support for applications that contain multiple services used in combination (composite applications) • Enables composite applications to share common information • Provides a normal session for the web services environment
WS-Context In A Nutshell • Allows composite applications to share common information. • Defines Notion of An Activity • Unit of work • Session construct • Shared scope of persistent data • Basic context associated with activity • Defines web services for maintaining contexts • 1 Activity per context • Operations for creating, completing and getting status of a context. • Ability to pass contexts by reference or by value.
WS-Context In A Nutshell (cont’d) • Practical uses include: • Distributed web sessions (less restricted form of standard web cookie) • Single sign-on • Transaction propagation • Processing of purchase order or travel itineraries
The Context Structure • An XML document containing a unique identifier and optional data specific to a related activity. • Typically included in the SOAP header of messages to and from web services participating in an activity. • Can be passed as a referenceable URI (by reference) or in its longer form (by value)
Overview • Demo loosely based on WS-I Sample Apps • Consists of implementations of WS-CTX services and modified version of WS-I Sample App Retailer Service. • Demonstrates interoperability between context implementations • Each implementation has a web based UI that will be used as a driver for the demos.
WS-CTX Services Implemented • ContextService • begin(beginMsg) • complete(completeMsg) // context passed in SOAP header • UserContextService • begun(begunMsg) //context passed in SOAP header • completed(completedMsg) //context passed in SOAP header
Demo Flow • User selects a catalogue of items from any store implementation. • User selects items from catalogue and adds them to his cart. • Store implementation begins new activity if there is no current shopping cart held by the user (no context in header). • User can choose to add more items from the same or a different catalogue. Store implementations will add these items to the existing cart. • User decides to finalize sale, by selecting a store (not necessarily one he has added items from), and submitting his order. • Store implementation completes activity by calling complete on the ContextService referenced by the Context (using the context-service element).
Flow Example CTX SVC. 1 3: begin Store 1 1: getCatalog 2: addItemToCart User 5: complete Store 2 CTX SVC. 2 4: submitOrder