Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL)...

19
Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005

Transcript of Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL)...

Page 1: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Web Services Conversation Language

Instructor: PINAR Yolum

Presented by: ILIR Bojaxhiu

(WSCL)

December 28, 2005

Page 2: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Objectives

..Why do we need WSCL? Where is WSCL used? What is WSCL? What does WSCL do? Elements of a WSCL

Specification Extending WSCL..

Page 3: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

..Why do we need WSCL?

A typical Web service will require its operations to be invoked in a certain order to progress the interaction through to completion.

Web services must expose computer-readable descriptions of how they should be used

We need a standard way of describing dependencies between operations

WSCL Defines WS Abstract Interface

Page 4: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Where is WSCL used?

Page 5: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

What is WSCL? The first technology submitted to a standards

body for describing the interactive behavioral aspects of a Web service (By HP, May 2001)

The interaction between the consumer and provider of a service is achieved through XML document exchange

WSCL is used to orchestrate the various message exchanges that occur at each stage of the conversation

WSCL conversation definitions are themselves XML documents

Page 6: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

What does WSCL do? Provides a means for:

declaring the types of messages that are exchanged

specifying the type of interaction that a message is used in (e.g. one-way, or bilateral)

specifying the transition conditions that allow the conversation to progress from one interaction to the next.

Page 7: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Elements of a WSCL Specification

WSCL Spec. has 4 main elements- Document types

- Interactions - Transitions - Conversations

Page 8: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Document types

Specify the types (schemas) of XML documents the service can accept and transmit in the course of a conversation.

Types : InboundXMLDocument OutboundXMLDocument

Ex: <InboundXMLDocument

hrefSchema="http://foo.org/PurchaseOrderRQ.xsd" id="PurchaseOrderRQ“>

</InboundXMLDocument>

Page 9: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Interactions Model the actions of the conversation as

document exchanges between two participants Five types of interactions supported in WSCL:

Send - service sends out an outbound document Receive - service receives an inbound document SendReceive - service sends out an outbound document

and then expects to receive an inbound document in reply

ReceiveSend - service receives an inbound document and then sends out an outbound document

Empty - does not contain any documents exchanged, but is used only for modeling the start and end of a conversation

Page 10: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Interactions (Example) One-Way Interactions

<Interaction interactionType="Receive" id="LoginRegInput"> <InboundXMLDocument id="LoginRequestData"

hrefSchema=http://foo.org/LoginRequestData.xsd /> </Interaction>

Two-Way Interactions<Interaction interactionType="SendReceive" id="Payment"> <OutboundXMLDocument id="Invoice"

hrefSchema="http://foo.org/InvoiceRS.xsd"> </OutboundXMLDocument>

<InboundXMLDocument id="Payment"

hrefSchema="http://foo.org/Payment.xsd"> </InboundXMLDocument> </Interaction>

Page 11: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Transitions Used to specify:

the ordering relationships between interactions

specifies a source interaction a destination interaction a document type of the source

interaction as an additional condition for the transition(optionally)

Page 12: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Transitions (Example) A conversation can proceed from one interaction

to another as allowed by the permissible sequencing defined in the transition elements.

<Transition> <SourceInteraction href="Login"/> <DestinationInteraction href="Purchase"/> <SourceInteractionCondition

href="ValidLoginRS"/> </Transition>

Page 13: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Conversations

List all the interactions and transitions that make up the conversation

Include: initialInteraction and finalInteraction name – the name of the conversation version (optional) – the version of the conversation. targetNamespace (optional) – the namespace of this

conversation as it should be used when elements of this conversation are referenced in other XML documents.

hrefSchema (optional) – the URL of the file containing this conversation definition.

description (optional)

Page 14: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Conversations <?xml version="1.0" encoding="UTF-8"?> <Conversation name="StoreFrontServiceConversation" version="1.01“ xmlns="http://www.w3.org/2002/02/wscl10" initialInteraction="Start" finalInteraction="End" targetNamespace="http://example.com/conversations/ StoreFront101“ hrefSchema="http://example.com/ schema_files/StoreFront101.wscl" description="Conversation for a Store Front Service" >

<ConversationInteractions> list of all the interactions </ConversationInteractions> <ConversationTransitions> list of all the transitions </ConversationTransitions> </Conversation>

Page 15: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Initial and Final Interactions

Part of defining the possible ordering of interactions is the specification of the first and last interactions of a conversation. initialInteraction - references the ID of the first

interaction to be executed in the conversation. finalInteraction - references the ID of the last

interaction to be executed in the conversation. There might be more than one interaction

with which the conversation can start or end.

Page 16: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

initialInteraction

Ex: Purchase Conversation Definition

Login<ReceiveSend>

Purchase<ReceiveSend>

Shipping<Send>

ValidLoginRS

PurchaseAcceptRS

InvalidLoginRS

OutOfStockRS

InvalidPaymentRS

Start

fnitialInteraction End

Arrow = Transition

Oval = Interaction

Page 17: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

Extending WSCL.. The WSCL specification contains the smallest

possible set of elements and attributes to describe conversations.

Possible extensions: Defining document types that have non-XML

content (e.g. binary attachments) Multi-party conversations with three or more

participants or roles Expressing timeouts and other quality of

service characteristics of individual interactions

Page 18: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.

THNX FOR THNX FOR LISTENINGLISTENING

Page 19: Web Services Conversation Language Instructor: PINAR Yolum Presented by: ILIR Bojaxhiu (WSCL) December 28, 2005.