Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Web Services Conversation Language (WSCL) Joy Lin November 18 2003."— Presentation transcript:

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. <InboundXMLDocument hrefSchema=“http://foo.org/PurchasePrderRQ.xsd” id=“PurchaseOrderRQ”

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. <InboundXMLDocument id="LoginRequestData" hrefSchema=http://foo.org/LoginRequestData.xsd>

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. <OutboundXMLDocument id="Invoice" hrefSchema="http://foo.org/InvoiceRS.xsd"> <InboundXMLDocument id="Payment “ hrefSchema="http://foo.org/Payment.xsd">

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. <InboundXMLDocument id="PurchaseOrderRQ" hrefSchema="http://conv123.org/PurchaseOrderRQ.xsd " > <OutboundXMLDocument id="PurchaseOrderAcceptedRS" hrefSchema="http://conv123.org/PurchaseOrderAcceptedRS.xsd" > <OutboundXMLDocument id="InvalidPaymentRS" hrefSchema="http://conv123.org/InvalidPaymentRS.xsd" > <OutboundXMLDocument id="OutOfStockRS" hrefSchema="http://conv123.org/OutOfStockRS.xsd" >

12 Transitions Transitions specify the ordering relationships between interactions. SourceInteracion – precede the DestinationInteraction when the conversation is executed. DestinationInteraction – follow the SourceInteraction when the conversation is executed. SourceInteractionCondition – an additional condition for the transition. (Optionally)

13 Example

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 <Conversation name=“ExampleConversation” initialInteraction = “Login” finalInteraction = “Purchase”>

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 conversation’s 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 <Conversation name=“simpleConversation" version="1.01“ xmlns="http://www.w3.org/2002/02/wscl10" initialInteraction="Start" finalInteraction="End“ description="Conversation for a Store Front Service" list of all the interactions list of all the transitions

19 Example – purchase conversation definition login ReceiveSend Purchase ReceiveSend shipping Send ValidLoginRS PurchaseAcceptRS InvalidLoginRS OutOfStockRS InvalidPaymentRS

20 Example – purchase conversation definition <Conversation name=“purchaseConversation" xmlns="http://www.w3.org/2002/02/wscl10" initialInteraction="Start" finalInteraction="End" > <InboundXMLDocument hrefSchema="http://conv123.org/LoginRQ.xsd" id="LoginRQ"/> <OutboundXMLDocument hrefSchema="http://conv123.org/ValidLoginRS.xsd“ id="ValidLoginRS"/> <OutboundXMLDocument hrefSchema="http://conv123.org/InvalidLoginRS.xsd" id="InvalidLoginRS" />

21 Example – purchase conversation definition <InboundXMLDocument hrefSchema="http://conv123.org/PurchaseOrderRQ.xsd" id="PurchaseOrderRQ" /> <OutboundXMLDocument id="PurchaseOrderAcceptedRS" hrefSchema="http://conv123.org/PurchaseOrderAcceptedRS.xsd" /> <OutboundXMLDocument id="InvalidPaymentRS“ hrefSchema="http://conv123.org/InvalidPaymentRS.xsd" /> <OutboundXMLDocument id="OutOfStockRS" hrefSchema="http://conv123.org/OutOfStockRS.xsd" /> <OutboundXMLDocument id="ShippingInformation" hrefSchema="http://conv123.org/ShippingInformation.xsd" />

22 Example – purchase conversation definition

23 Example – purchase conversation definition

24 Example – purchase conversation definition

25


Download ppt "Web Services Conversation Language (WSCL) Joy Lin November 18 2003."

Similar presentations


Ads by Google