Web Services Conversation Language (WSCL) - PowerPoint PPT Presentation

About This Presentation
Title:

Web Services Conversation Language (WSCL)

Description:

WSCL conversation definitions are themselves XML documents. ... hrefSchema(optional) the URL of the file containing this conversation definition. ... – PowerPoint PPT presentation

Number of Views:244
Avg rating:3.0/5.0
Slides: 26
Provided by: csU45
Category:

less

Transcript and Presenter's Notes

Title: Web Services Conversation Language (WSCL)


1
Web Services Conversation Language(WSCL)
  • Joy Lin
  • November 18 2003

2
Contents
  • Introduction
  • Elements of a WSCL specification
  • - Document types
  • - Interactions
  • - Transitions
  • - Conversations
  • Example

3
What is WSCL?
  • Web Services Conversation Language.
  • WSCL conversation definitions are themselves XML
    documents.
  • Specifies the XML documents being exchanged, and
    the allowed sequencing of these document
    exchanges.
  • WSCL and WSDL are highly complimentary WSDL
    specifies how to send messages to a service and
    WSCL specifies the order in which such message
    can be sent.

4
Elements of a WSCL Specification
  • There are four main elements of a WSCL
    specification
  • Document type descriptions
  • Interactions
  • Transitions
  • Conversations

5
Document type descriptions
  • Specify the types (schemas) of XML documents the
    service can accept and transmit in the course of
    a conversation.
  • The document schemas are separate XML documents
    referenced by their URL in the XMLDocumemtType
    elements of the conversation specification
  • InboundXMLDocument
  • OutboundXMLDocument

6
Example
  • hrefSchema - refers to the schema to which the
    documents corresponds.
  • id - can be used within the rest of the
    conversation definition.
  • Example An input document that conforms to a
    purchase order schema defined in
    PurchasedOrderRQ.xsd.

ltInboundXMLDocument hrefSchemahttp//foo.o
rg/PurchasePrderRQ.xsd idPurchaseOrderRQ
lt/InboundXMLDocumentgt
7
Interactions
  • An interaction is an exchange of documents
    between a service and its client.
  • WSCL only models business level interactions. It
    only specifies which business level documents are
    exchanged and does not model how this exchange is
    carried out by lower-level messaging protocols.
  • One-Way Interactions
  • Send the service sends out an outbound
    document.
  • Receive the service receives an inbound
    document.

8
Interactions
  • Two-Way Interactions
  • SendReceive the service sends out an outbound
    document and then expects to receive an inbound
    document in reply.
  • ReceiveSend the 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.

9
Example One-Way Interactions
  • One-Way interactions represent a single one-way
    message being sent or received by a participant.
  • This example represents a Receive interaction
    that receives a login document.

ltInteraction interactionType"Receive"
id"LoginRegInput"gt ltInboundXMLDocument
id"LoginRequestData"
hrefSchemahttp//foo.org/LoginRequestData.xsdgt
lt/InboundXMLDocumentgt lt/Interactiongt
10
Example Two-Way Interactions
  • A SendReceive example Each SendReceive
    interaction is the logical unit of sending a
    request and then receiving a response. The
    interaction is not complete until the response
    has been exchanged.

ltInteraction interactionType"SendReceive"
id"Payment"gt ltOutboundXMLDocument
id"Invoice" hrefSchema"http//foo.o
rg/InvoiceRS.xsd"gt lt/OutboundXMLDocumentgt
ltInboundXMLDocument id"Payment
hrefSchema"http//foo.org/Payment.xsd"gt
lt/InboundXMLDocumentgt lt/Interactiongt
11
Example Two-Way Interactions
  • This example shows a Purchase interaction that
    specifies two additional outbound document types
    for the case of invalid payment and out of stock.

ltInteraction interactionType"ReceiveSend"
id"Purchase" gt ltInboundXMLDocument
id"PurchaseOrderRQ"
hrefSchema"http//conv123.org/PurchaseOrderRQ.xsd
" gt lt/InboundXMLDocumentgt
ltOutboundXMLDocument id"PurchaseOrderAcceptedRS"
hrefSchema"http//conv123.org/Purchas
eOrderAcceptedRS.xsd" gt lt/OutboundXMLDocumentgt
ltOutboundXMLDocument id"InvalidPaymentRS"
hrefSchema"http//conv123.org/Invalid
PaymentRS.xsd" gt lt/OutboundXMLDocumentgt
ltOutboundXMLDocument id"OutOfStockRS"
hrefSchema"http//conv123.org/OutOfStockRS.xsd"
gt lt/OutboundXMLDocumentgt lt/Interactiongt
12
Transitions
  • Transitions specify the ordering relationships
    between interactions.
  • SourceInteracion precede the DestinationInteract
    ion when the conversation is executed.
  • DestinationInteraction follow the
    SourceInteraction when the conversation is
    executed.
  • SourceInteractionCondition an additional
    condition for the transition. (Optionally)

13
Example
ltTransitiongt ltSourceInteraction
href"Login"/gt ltDestinationInteraction
href"Login"/gt ltSourceInteractionCondition
href"InvalidLoginRS"/gt lt/Transitiongt
ltTransitiongt ltSourceInteraction
href"Login"/gt ltDestinationInteraction
href"Purchase"/gt ltSourceInteractionCondition
href"ValidLoginRS"/gt lt/Transitiongt
14
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.
  • Example

ltConversation nameExampleConversation
initialInteraction Login
finalInteraction Purchasegt
15
Initial and Final Interactions
  • There might be more than one interaction with
    which the conversation can start or end.
  • To specify several possible start and end
    interactions, interactions of type Empty is used.
  • An interaction type Empty is an interaction in
    which no documents are exchanged. Currently, the
    only situation in which Empty interactions can be
    used in a conversation definition is when several
    possible final or initial interactions need to be
    modeled.

16
Conversation
  • Conversations list all the interactions and
    transitions that make up the conversation.
  • A conversation contains additional information
    about the conversation, including the
    conversations name and the interaction the
    conversation can start with and end with.
  • The Conversation element contains the following
    two sub elements
  • ConversationInteractions list all Interaction
    elements.
  • ConversationTransitions lists all Transition
    elements.

17
Conversation
  • The Conversation element contains the following
    attributes
  • 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)

18
Example
  • lt?xml version"1.0" encoding"UTF-8"?gt
  • ltConversation namesimpleConversation"
  • version"1.01
  • xmlns"http//www.w3.org/2002/02/wscl10"
  • initialInteraction"Start"
  • finalInteraction"End
  • description"Conversation for a Store Front
    Service"
  • ltConversationInteractionsgt
  • list of all the interactions
  • lt/ConversationInteractionsgt
  • ltConversationTransitionsgt
  • list of all the transitions
  • lt/ConversationTransitionsgt
  • lt/Conversationgt

19
Example purchase conversation definition
login ReceiveSend
InvalidLoginRS
ValidLoginRS
Purchase ReceiveSend
PurchaseAcceptRS
OutOfStockRS InvalidPaymentRS
shipping Send
20
Example purchase conversation definition
  • ltConversation namepurchaseConversation"
  • xmlns"http//www.w3.org/2002/02/wscl10"
  • initialInteraction"Start"
  • finalInteraction"End" gt
  • ltConversationInteractionsgt
  • ltInteraction interactionType"ReceiveSen
    d" id"Login"gt
  • ltInboundXMLDocument
    hrefSchema"http//conv123.org/LoginRQ.xsd"
  • id"LoginRQ"/gt
  • ltOutboundXMLDocument
    hrefSchema"http//conv123.org/ValidLoginRS.xsd
  • id"ValidLoginRS"/gt
  • ltOutboundXMLDocument
    hrefSchema"http//conv123.org/InvalidLoginRS.xsd"
  • id"InvalidLoginRS" /gt
  • lt/Interactiongt

21
Example purchase conversation definition
  • ltInteraction interactionType"ReceiveSend"
    id"Purchase" gt
  • ltInboundXMLDocument hrefSchema"http//conv123
    .org/PurchaseOrderRQ.xsd"
  • id"PurchaseOrderRQ" /gt
  • ltOutboundXMLDocument id"PurchaseOrderAccepted
    RS"
  • hrefSchema"http//conv123.org/Purchase
    OrderAcceptedRS.xsd" /gt
  • ltOutboundXMLDocument id"InvalidPaymentRS
  • hrefSchema"http//conv123.org/InvalidP
    aymentRS.xsd" /gt
  • ltOutboundXMLDocument id"OutOfStockRS"
  • hrefSchema"http//conv123.org/OutOfSto
    ckRS.xsd" /gt
  • lt/Interactiongt
  • ltInteraction interactionType"Send" id"Shipping"
    gt
  • ltOutboundXMLDocument id"ShippingInformation"
  • hrefSchema"http//conv123.org/Shipping
    Information.xsd" /gt
  • lt/Interactiongt
  • ltInteraction interactionType"Empty" id"Start"
    /gt
  • ltInteraction interactionType"Empty" id"End" /gt
  • lt/ConversationInteractionsgt

22
Example purchase conversation definition
  • ltConversationTransitionsgt
  • ltTransitiongt
  • ltSourceInteraction href"Start"/gt
  • ltDestinationInteraction href"Login"/gt
  • lt/Transitiongt
  • ltTransitiongt
  • ltSourceInteraction href"Login"/gt
  • ltDestinationInteraction
    href"Purchase"/gt
  • ltSourceInteractionCondition
    href"ValidLoginRS"/gt
  • lt/Transitiongt
  • ltTransitiongt
  • ltSourceInteraction href"Login"/gt
  • ltDestinationInteraction href"Login"/gt
  • ltSourceInteractionCondition
    href"InvalidLoginRS"/gt
  • lt/Transitiongt

23
Example purchase conversation definition
  • ltTransitiongt
  • ltSourceInteraction href"Purchase"/gt
  • ltDestinationInteraction href"Shipping"/gt
  • ltSourceInteractionCondition
    href"PurchaseAcceptedRS"/gt
  • lt/Transitiongt
  • ltTransitiongt
  • ltSourceInteraction href"Shipping"/gt
  • ltDestinationInteraction href"End"/gt
  • lt/Transitiongt
  • ltTransitiongt
  • ltSourceInteraction href"Purchase"/gt
  • ltDestinationInteraction href"End"/gt
  • ltSourceInteractionCondition href"InvalidPaymen
    tRS"/gt
  • lt/Transitiongt

24
Example purchase conversation definition
  • ltTransitiongt
  • ltSourceInteraction href"Purchase"/gt
  • ltDestinationInteraction href"End"/gt
  • ltSourceInteractionCondition
    href"OutOfStockRS"/gt
  • lt/Transitiongt
  • lt/ConversationTransitionsgt
  • lt/Conversationgt

25
(No Transcript)
Write a Comment
User Comments (0)
About PowerShow.com