Web Services Architecture Usage Scenarios

Editors' copy $Date: 2003/09/25 21:10:16 $ @@ @@@ 2003

This version:
http://www.w3.org/2002/ws/arch/2/@@/@@-ws-arch-scenarios/ws-arch-scenarios
Latest version:
http://www.w3.org/TR/ws-arch-scenarios/
Previous version:
http://www.w3.org/2002/ws/arch/2/06/wd-wsa-reqs-20020605
Editors:
Hugo Haas , W3C
David Orchard , BEA Systems

Abstract

This document describes the Web Service Architecture use cases and Usage Scenarios.

It is a collection of use cases and usage scenarios which illustrate the use of Web services. They are used to generate requirements for the Web services architecture, as well as to evaluate existing technologies.

Status of this Document

This document is an editors' copy that has no official standing.

This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C.

For a detailed list of changes since the last publication of this document, refer to B Web Services Architecture Usage Scenarios Changes. A list of open issues against this document is maintained by the Working Group.

Comments on this document should be sent to www-wsa-comments@w3.org (public archive). It is inappropriate to send discussion emails to this address.

Discussion of this document takes place on the public www-ws-arch@w3.org mailing list (public archives) per the email communication rules in the Web Services Architecture Working Group Charter.

Table of Contents

1 Introduction
2 Use cases
    2.1 Travel agent use case, static discovery
        2.1.1 Description
        2.1.2 Scope
        2.1.3 Stakeholders / Interests
        2.1.4 Actors & Goals
        2.1.5 Usage scenarios
            2.1.5.1 1. User requests availabilities about some travel dates
                2.1.5.1.1 Goal / Context
                2.1.5.1.2 Scenario / Steps
                2.1.5.1.3 Extensions
                2.1.5.1.4 Technologies / Requirements
            2.1.5.2 2. User chooses flight and looks for hotels
                2.1.5.2.1 Goal / Context
                2.1.5.2.2 Scenario / Steps
                2.1.5.2.3 Extensions
                2.1.5.2.4 Technologies / Requirements
            2.1.5.3 3. User books hotel room and flight
                2.1.5.3.1 Goal / Context
                2.1.5.3.2 Scenario / Steps
                2.1.5.3.3 Extensions
                2.1.5.3.4 Technologies / Requirements
            2.1.5.4 Developer creates travel agent web service that queries for airline flights.
                2.1.5.4.1 Goal / Context
                2.1.5.4.2 Scenario / Steps
            2.1.5.5 Notes on the scenario
    2.2 Travel agent use case, dynamic discovery
        2.2.1 Description
        2.2.2 Scope
        2.2.3 Stakeholders / Interests
        2.2.4 Actors & Goals
        2.2.5 Usage scenarios
            2.2.5.1 1. User requests availabilities about some travel dates
                2.2.5.1.1 Goal / Context
                2.2.5.1.2 Scenario / Steps
                2.2.5.1.3 Extensions
                2.2.5.1.4 Technologies / Requirements
            2.2.5.2 2. User chooses flight and looks for hotels
                2.2.5.2.1 Goal / Context
                2.2.5.2.2 Scenario / Steps
                2.2.5.2.3 Extensions
                2.2.5.2.4 Technologies / Requirements
            2.2.5.3 3. User books hotel room and flight
                2.2.5.3.1 Goal / Context
                2.2.5.3.2 Scenario / Steps
                2.2.5.3.3 Extensions
                2.2.5.3.4 Technologies / Requirements
            2.2.5.4 Notes on the scenario
    2.3 EDI-like purchasing
        2.3.1 Description
        2.3.2 Scope
        2.3.3 Stakeholders / Interests
        2.3.4 Actors & Goals
        2.3.5 Usage Scenarios
            2.3.5.1 1. Typical Widget Purchase
                2.3.5.1.1 Goal / Context
                2.3.5.1.2 Scenario / Steps
                2.3.5.1.3 Extensions
                2.3.5.1.4 Technologies / Requirements
            2.3.5.2 2. Transaction Log Mismatch
                2.3.5.2.1 Goal / Context
                2.3.5.2.2 Scenario / Steps
                2.3.5.2.3 Extensions
                2.3.5.2.4 Technologies / Requirements
            2.3.5.3 3. SmallCo Incorrectly Thinks They Weren't Paid
                2.3.5.3.1 Goal / Context
                2.3.5.3.2 Scenario / Steps
                2.3.5.3.3 Extensions
                2.3.5.3.4 Technologies / Requirements
            2.3.5.4 4. SmallCo Really Wasn't Paid
                2.3.5.4.1 Goal / Context
                2.3.5.4.2 Scenario / Steps
                2.3.5.4.3 Extensions
                2.3.5.4.4 Technologies / Requirements
3 Usage Scenarios
    3.1 S001 Fire-and-forget to single receiverDescription
        3.1.1 Scenario Definition
    3.2 S002 Fire-and-forget to multiple receiversDescription
        3.2.1 Scenario Definition
    3.3 S003 Request/ResponseDescription
        3.3.1 Scenario Definition
    3.4 S004 Remote Procedure Call (RPC)Description
        3.4.1 Scenario Definition
    3.5 S006 Multiple Faults WS-Arch WG Specific
        3.5.1 Scenario Definition
        3.5.2 Description
    3.6 S007 Multiple asynchronous responsesDescription
        3.6.1 Scenario Definition
    3.7 S010 Request with acknowledgementWS-Arch WG Specific
        3.7.1 Scenario Definition
        3.7.2 Description
        3.7.3 Use case citations
    3.8 S030 Third party intermediaryDescription
        3.8.1 Scenario Definition
    3.9 S031 Communication via multiple intermediariesDescription
        3.9.1 Scenario Definition
    3.10 S032 CachingDescription
        3.10.1 Scenario Definition
    3.11 S035 RoutingDescription
        3.11.1 Scenario Definition
    3.12 S036 TrackingDescription
        3.12.1 Scenario Definition
    3.13 S037 Caching with expirationDescription
        3.13.1 Scenario Definition
    3.14 S040 Conversational message exchangeWS-Arch WG Specific
        3.14.1 Scenario Definition
        3.14.2 Description
        3.14.3 Use case citations
    3.15 S061 Request with encrypted payloadWS-Arch WG Specific
        3.15.1 Scenario Definition
        3.15.2 Description
        3.15.3 Use case citations
    3.16 S062 Message header and payload encryptionDescription
        3.16.1 Scenario Definition
        3.16.2 Use case citations
    3.17 S0621 Attachment encryptionDescription
        3.17.1 Scenario Definition
        3.17.2 Use case citations
    3.18 S063 Authentication WS-Arch WG Specific
        3.18.1 Scenario Definition
        3.18.2 Description
        3.18.3 Use case citations
    3.19 S064 Message IntegrityWS-Arch WG Specific
        3.19.1 Scenario Definition
        3.19.2 Description
    3.20 S065 Authentication of dataWS-Arch WG Specific
        3.20.1 Scenario Definition
        3.20.2 Description
        3.20.3 Use case citations
    3.21 S070 Asynchronous messagingWS-Arch WG Specific
        3.21.1 Scenario Definition
        3.21.2 Description
        3.21.3 Use case citations
    3.22 S071 Asynch/Synchronous specificity WS-Arch WG Specific
        3.22.1 Scenario Definition
        3.22.2 Description
    3.23 S080 TransactionWS-Arch WG Specific
        3.23.1 Scenario Definition
        3.23.2 Description
        3.23.3 Use case citations
    3.24 S090 Sending non-XML dataWS-Arch WG Specific
        3.24.1 Scenario Definition
        3.24.2 Description
        3.24.3 Use case citations
    3.25 S091 Incremental parsing/processing of SOAP messagesDescription
        3.25.1 Scenario Definition
    3.26 S092 Streaming Response WS-Arch WG Specific
        3.26.1 Scenario Definition
        3.26.2 Description
    3.27 S200 Event notificationDescription
        3.27.1 Scenario Definition
    3.28 S201 Event Management ModelWS-Arch WG Specific
        3.28.1 Scenario Definition
        3.28.2 Description
    3.29 S300 System MessagesWS-Arch WG Specific
        3.29.1 Scenario Definition
        3.29.2 Description
    3.30 S500 Service Metadata WS-Arch WG Specific
        3.30.1 Scenario Definition
        3.30.2 Description
    3.31 S501 Service Level attributesWS-Arch WG Specific
        3.31.1 Scenario Definition
        3.31.2 Description
    3.32 S502 Operation Level attributes WS-Arch WG Specific
        3.32.1 Scenario Definition
        3.32.2 Description
    3.33 S503 Namespaces with data and interfaces WS-Arch WG Specific
        3.33.1 Scenario Definition
        3.33.2 Description
    3.34 S504 VersioningWS-Arch WG Specific
        3.34.1 Scenario Definition
        3.34.2 Description
    3.35 S505 Classification system for operationsWS-Arch WG Specific
        3.35.1 Scenario Definition
        3.35.2 Description
    3.36 S510 Quality of serviceDescription
        3.36.1 Scenario Definition
    3.37 S600 Address based Discovery WS-Arch WG Specific
        3.37.1 Scenario Definition
        3.37.2 Description
        3.37.3 Use case citations
    3.38 S601 Registry based discoveryWS-Arch WG Specific
        3.38.1 Scenario Definition
        3.38.2 Description
    3.39 S Template WS-Arch WG Specific
        3.39.1 Scenario Definition
        3.39.2 Description
4 References
    4.1 Informative References

Appendices

A Acknowledgments (Non-Normative)
B Web Services Architecture Usage Scenarios Changes (Non-Normative)


1 Introduction

This document specifies a variety of Web services use cases and usage scenarios.

The following convention has been adopted for numbering the usage scenarios:

  1. S0**: Message exchange patterns, i.e. RPC, asynchrony, security, reliability, conversations.

  2. S2**: Event based message exchange patterns.

  3. S3**: System and other messages.

  4. S5**: Service description above and beyond those in less than 5** numbers.

  5. S6**: Discovery.

2 Use cases

This section contains use cases giving more context to some of the individual usages scenarios listed in 3 Usage Scenarios.

2.1 Travel agent use case, static discovery

2.1.5 Usage scenarios

The following usage scenarios describe how a user would make a reservation for a vacation package (flight and hotel room), and how a developer would create a portion of a service.

Overview of the travel agent use case

It has to be noted that some additional technology is or may be needed for this usage scenario:

  • context maintenance.

  • reliability: in order to make money, each step needs to happen.

  • trust mechanisms for the services to do business with each other.

  • description of orchestration of services: if a reservation of a flight involves interacting with a couple of Web services, the airline would document in a machine readable way how to interact with the two single services in order to get the desired result, including how to handle errors in the process fails before the operation is completed.

  • transactions: either compensating or atomic transactions may make the implementation of the reservation be of higher quality.

  • ...

Note that this usage scenario could be different in the following ways:

  • the user could have bought some travel agent software; the travel agent service could reside locally on his/her computer.

  • the user could write tools to interact directly with the airline and hotel services.

The WSDL for most of the interactions are in the WSDL Primer

2.1.5.3 3. User books hotel room and flight
2.1.5.3.2 Scenario / Steps
  1. The user communicates his/her accommodation choice to the travel agent service.

  2. The travel agent service contacts the payment service that the user chose to confirm payment:

    1. The travel agent service requests a description of how to guarantee payment of the total amount.

    2. The travel agent service send the request accordingly.

    3. The response indicates success with an authorization identifier, signed by the payment authority.

  3. The travel agent service books the hotel room:

    1. The travel agent service sends a request in order to find out how to cancel the reservation should a problem occur later in the process.

    2. The travel agent service sends the request accordingly, along with a payment authorization identifier from the payment service.

  4. The travel agent service confirms the flight reservation:

    1. The travel agent service sends the request to buy a ticket on hold, along with a payment authorization identifier from the payment service.

  5. The travel agent service charges a fee to the user:

    1. The travel agent service sends the request to the payment service, along with the authorization identifier signed by the payment service.

  6. The service provides the user with various confirmation identifiers and wishes the user a good vacation.

When the travel agent service communicates a proof of payment authorization to the hotel and airline services, the message should carry some proof that the authorization token is indeed coming from a payment service (see 3.20 S065 Authentication of dataWS-Arch WG Specific).

Communication with the payment service will requires confidentiality, which can be achieved with encryption technologies (e.g. 3.15 S061 Request with encrypted payloadWS-Arch WG Specific, 3.16 S062 Message header and payload encryptionDescription and 3.17 S0621 Attachment encryptionDescription).

Communication with the payment service could require the image of a signature, aka a binary attachment, using attachments technologies (e.g. 3.24 S090 Sending non-XML dataWS-Arch WG Specific).

Communication with the payment service should be delivered exactly once, using reliable messaging technologies (e.g. 3.7 S010 Request with acknowledgementWS-Arch WG Specific).

Communication with the payment service and the hotel reservation could be under transactional control, which can be achieved with transaction technologies (e.g. 3.23 S080 TransactionWS-Arch WG Specific).

2.2 Travel agent use case, dynamic discovery

This use case is variation of the 2.1 Travel agent use case, static discovery, in which the description of the services is discovered at run time.

Editorial note: HH 
There probably is some factorization possible with the previous section.

2.2.5 Usage scenarios

The following usage scenarios describe how a user would make a reservation for a vacation package (flight and hotel room).

Overview of the travel agent use case

An assumption for this usage scenario is that all the services are using common concepts (e.g. flight, economy class, room, etc). For the travel agent service to understand the airline services and to be able to send meaningful information to them, a travel industry ontology needs to exist and be used by the Web services taking part in this scenario. An ontology is a formal description of a set of concepts and their relationships to each other. By associating a name with each concept, an ontology defines a standard vocabulary that can be used to communicate those concepts.

Use of common concepts in the dynamic travel agent use case

It has to be noted that some additional technology is needed for this usage scenario:

  • context maintenance.

  • reliability: in order to make money, each step needs to happen.

  • trust mechanisms for the services to do business with each other.

  • description of orchestration of services: if a reservation of a flight involves interacting with a couple of Web services, the airline would document in a machine readable way how to interact with the two single services in order to get the desired result, including how to handle errors in the process fails before the operation is completed.

  • ...

Note that this usage scenario could be different in the following ways:

  • the user could have bought some travel agent software; the travel agent service could reside locally on his/her computer.

  • the user could write tools to interact directly with the airline and hotel services.

2.2.5.1 1. User requests availabilities about some travel dates
2.2.5.2 2. User chooses flight and looks for hotels
2.2.5.3 3. User books hotel room and flight
2.2.5.3.2 Scenario / Steps
  1. The user communicates his/her accommodation choice to the travel agent service.

  2. The travel agent service contacts the payment service that the user chose to confirm payment:

    1. The travel agent service requests a description of how to guarantee payment of the total amount.

    2. The travel agent service send the request accordingly.

    3. The response indicates success with an authorization identifier, signed by the payment authority.

  3. The travel agent service books the hotel room:

    1. The travel agent service requests a description of how to book a room to the chosen hotel service.

    2. The travel agent service sends a request in order to find out how to cancel the reservation should a problem occur later in the process.

    3. The travel agent service sends the request accordingly, along with a payment authorization identifier from the payment service.

  4. The travel agent service confirms the flight reservation:

    1. The travel agent service requests a description of how to buy a ticket on hold to the airline service.

    2. The travel agent service sends a request in order to find out how to cancel the reservation should a problem occur later in the process.

    3. The travel agent service sends the request accordingly, along with a payment authorization identifier from the payment service.

  5. The travel agent service charges a fee to the user:

    1. The travel agent service requests a description of how to request payment to the payment service.

    2. The travel agent service sends the request accordingly, along with the authorization identifier signed by the payment service.

  6. The service provides the user with various confirmation identifiers and wishes the user a good vacation.

When the travel agent service communicates a proof of payment authorization to the hotel and airline services, the message should carry some proof that the authorization token is indeed coming from a payment service (see 3.20 S065 Authentication of dataWS-Arch WG Specific).

Also, communication with the payment service will requires confidentiality, which can be achieved with encryption technologies (e.g. 3.15 S061 Request with encrypted payloadWS-Arch WG Specific, 3.16 S062 Message header and payload encryptionDescription and 3.17 S0621 Attachment encryptionDescription).

Overview of the transactions

2.3 EDI-like purchasing

2.3.1 Description

A large company (BigCo) wants to purchase widgets from a small widget manufacturer (SmallCo) using web services to transmit the various documents (e.g. purchase orders and invoices) involved. There are web services set up at both BigCo and SmallCo that handle the document transmissions required to implement an industry-specific business process which has been defined by an industry-vertical standards body (e.g. ComProServ from PIDX, a protocol for obtaining oil field services). In addition to the documents involved in this business process there are payments sent through a different financial service.

BigCo and SmallCo set up a trading relationship in which web services provide functions similar to those offered in a proprietary setting by EDI VAN's (Value Added Networks).

2.3.5 Usage Scenarios

The following usage scenarios first illustrate the steps involved in a typical purchasing transaction, then show some typical "fixing the screwups" operations.

2.3.5.1 1. Typical Widget Purchase
2.3.5.1.4 Technologies / Requirements

The basic transactions take place via Asynchronous Messaging ( see 3.21 S070 Asynchronous messagingWS-Arch WG Specific). However, each of the steps of this process must also be reliable. That is, there is a process in place by which when a message is sent the sender knows that it will either get through or create an error condition, and that there is a high probability of it getting through. Each message generates a confirmation of receipt message back to the sender, that is, Request with Acknowledgement ( see 3.7 S010 Request with acknowledgementWS-Arch WG Specific). In addition, each message carries a unique identifier, a date-time stamp (showing the time at which the message was sent, not necessarily the delivery time), and information that allows the messages to be logically ordered. (These capabilities will be exercised in subsequent scenarios). The identification requirements may be part of Conversational Message Exchange (see 3.14 S040 Conversational message exchangeWS-Arch WG Specific), although this Usage Scenario has not yet included these capabilities explicitly.

We are requiring here that the messages be ordered but not sequenced, even though many of the VAN's on which this usage scenario is based do offer sequencing. Sequencing would imply that each message between two partners in a given direction has a sequential index and that no gaps are allowed. One could then, if desired, set up a process in which sequential receipt were enforced. That is, if BigCo gets message 22 from SmallCo and then receives message 24, BigCo would not accept message 24 (presumably holding it in some sort of buffer) until message 23 arrived, and probably would throw some sort of error if it did not arrive in some time period. We are not including this type of operation in the usage scenario because we feel that it is fairly unusual actually to make use of this logic. Moreover, if desired such sequencing could be made part of the payload and included in the business logic. The only reason we can think of to include sequencing in the enveloping mechanism would be to enforce sequencing across different types of business transaction, and we don't think that this is likely to be very useful. Would you want to hold up an invoice, for example, because a message involving HR had not arrived yet?

The usual security suspects (Accessibility, Authentication, Authorization, Confidentiality, Integrity and non-Repudiation) are all matters of concern. Non-Repudiation is of particular importance, although in practical terms less in terms of a legal process than simply the ability to say, "You got this invoice on March 24, and here is your signed confirmation of receipt". That is, by far the most common scenarios that require non-repudiation involve people in both companies trying, in good faith, to sort out something which would go wrong in some transaction. What is required in these cases is an unambiguous record, not rock-solid legal proof. Taking these issues to court is a very rare occurrence given an ongoing trading relationship between businesses. This is probably a less strong requirement than what is usually called "non-repudiation", but stronger than "auditing". Perhaps we can call this requirement "reconciliation". Various aspects of Reconciliation will be exercised in the usage scenarios below.

Other aspects of security are also necessary. It must be possible for both BigCo and SmallCo to be sure that the messages they receive are actually from the company that they are supposed to be. That is, each company must be able to identify itself unambiguously (Authentication ,see 3.18 S063 Authentication WS-Arch WG Specific)). In addition, there is the question of what actions the company is authorized to request from the web service. For example, BigCo needs to be able to query SmallCo's web service for a list of messages that have been sent between these two participants, but not for information about transactions with other companies that purchase widgets from SmallCo. Both companies need to be confident that the communications cannot be tampered with or observed by third parties, and that third parties cannot send communications pretending to be who they are not.

The SmallCo web service knows how to receive and send messages and will present these messages to users at SmallCo in a browser window. A SmallCo employee transfers information from the XML to their bookkeeping system via cut and paste. How does SmallCo generate the XML that goes into the messages that it sends? The web service knows how to generate the envelop (message ID, datetime, and so on), but not the message contents. To assist SmallCo's either BigCo or the industry standards body provides a web site that implements messages like "quote" and "invoice" in a web form into which a SmallCo person types information and which returns suitably formatted XML in the browser window.

2.3.5.2 2. Transaction Log Mismatch
2.3.5.3 3. SmallCo Incorrectly Thinks They Weren't Paid

3 Usage Scenarios

3.3 S003 Request/Response

3.3 Description

Scenario S3 requires a request/response message feature. A request containing some business document is sent by a SOAP Sender to a SOAP Receiver where some business application is invoked. The business application processes the request and generates a response, which is returned to the SOAP Sender that originated the request. Two alternative solutions are described which depend upon the characteristics of the underlying transport layer. In either case, the SOAP Sender is informed of the status (successful or otherwise) of the request message delivery.

Figure 3 Request/Response using underlying transport

If the underlying transport protocol supports the correlation of a request and its matching response directly, then the solution illustrated in Figure 3 may be appropriate. An example of such an underlying transport protocol would be a synchronous HTTP POST. This implementation would make use of the transport binding proposed in other XML Protocol WG documents. The business document sent as a request by the SOAP Sender would be inserted as the payload of the request message. Following the receipt of the request, the processing application would generate a document which would be returned as the payload of the response message with appropriate status codes. If for whatever reason, the request message was not received or processed by the intended business application, suitable status messages would be generated by the underlying transport layer and reported to the SOAP Sender.

Figure 4 Request/Response using SOAP headers

If the underlying transport protocol does not support a request/response model, then the configuration shown in Figure 4 may be appropriate. Examples of such an underlying protocol may include unidirectional queuing middleware. In this case, message identification and correlation is provided by SOAP Headers. In the request SOAP message, a Message Identifier Handler is responsible for generating a unique message identifier and inserting it into a SOAP Header. This forms part of the SOAP request message and is sent from SOAP Application 1 to the receiving SOAP Application 2. The request message is processed by a business application and a response message is assembled. This includes a SOAP Header built by a Message Correlation Handler which links the response message to its associated request.

Example: SOAP request message containing a message identifier
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:MsgHeader xmlns:n="http://example.org/requestresponse">
      <n:MessageId>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:MessageId>
    </n:MsgHeader>
  </env:Header>
  <env:Body>
      ........
  </env:Body>
</env:Envelope>
Example: SOAP response message containing correlation to original request
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:MsgHeader xmlns:n="http://example.org/requestresponse">
      <n:MessageId>uuid:09233523-567b-2891-b623-9dke28yod7m9</n:MessageId>
      <n:ResponseTo>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:ResponseTo>
    </n:MsgHeader>
  </env:Header>
  <env:Body>
      ........
  </env:Body>
</env:Envelope>

3.4 S004 Remote Procedure Call (RPC)

3.4 Description

Scenario S4 differs from scenario S3 in that the request message consists of a set of serialized parameters used to invoke some remote procedure which responds with a set of results. This is a different programming model to the document exchange one illustrated by scenario S3. Scenario S4 requires a request/response mechanism as in S3, with the parameter and result serialization needed for the RPC programming model form the SOAP Body element.

Figure 5 RPC using underlying transport

Figure 5 illustrates an RPC invocation over an underlying transport protocol such as HTTP that supports request/response. In this case, no additional headers are needed to correlate the request and response messages. Example request and response SOAP messages are:

Example: SOAP RPC request message
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Body>
    <r:GetLastTradePrice env:encodingStyle="http://www.w3.org/2002/06/soap-encoding"
                            xmlns:r="http://example.org/2001/06/quotes">
      <r:Symbol>DEF</r:Symbol>
    </r:GetLastTradePrice>
  </env:Body>
</env:Envelope>
Example: SOAP RPC response message
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Body>
    <r:GetLastTradePriceResponse env:encodingStyle="http://www.w3.org/2002/06/soap-encoding"
                            xmlns:r="http://example.org/2001/06/quotes"
                            xmlns:rpc="http://www.w3.org/2002/06/soap-rpc">
      <rpc:Result>34.5</rpc:Result>
    </r:GetLastTradePriceResponse>
  </env:Body>
</env:Envelope>
Figure 6 RPC using SOAP headers

In Figure 6, the underlying transport protocol does not support request/response directly. The RPC request and response elements again form the Body of the SOAP messages. Correlation of the request and response is provided by the Message Identifier and Message Correlation handlers as described in scenario S3.

Example: SOAP RPC request message with message identification
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:MsgHeader xmlns:n="http://example.org/requestresponse">
      <n:MessageId>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:MessageId>
    </n:MsgHeader>
  </env:Header>
  <env:Body>
    <r:GetLastTradePrice env:encodingStyle="http://www.w3.org/2002/06/soap-encoding"
                            xmlns:r="http://example.org/2001/06/quotes">
      <r:Symbol>DEF</r:Symbol>
    </r:GetLastTradePrice>
  </env:Body>
</env:Envelope>
Example: SOAP RPC response message containing correlation to original request
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:MsgHeader xmlns:n="http://example.org/requestresponse">
      <n:MessageId>uuid:09233523-567b-2891-b623-9dke28yod7m9</n:MessageId>
      <n:ResponseTo>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:ResponseTo>
    </n:MsgHeader>
  </env:Header>
  <env:Body>        
    <r:GetLastTradePriceResponse env:encodingStyle="http://www.w3.org/2002/06/soap-encoding"
                                    xmlns:r="http://example.org/2001/06/quotes"
                                    xmlns:rpc="http://www.w3.org/2002/06/soap-rpc">
      <rpc:Result>34.5</rpc:Result>
    </r:GetLastTradePriceResponse>
  </env:Body>
</env:Envelope>

3.6 S007 Multiple asynchronous responses

3.6 Description

Figure 16 Multiple asynchronous responses

Scenario S20 is an extension of scenario DS17 - asynchronous messaging. Instead of a single response message, more than one can be sent by the receiving application to the originator. A simple architecture would be the same as DS17 with multiple responses received by the originating application and correlated to the original request by a Message Correlation Handler. Figure 15 illustrates an extension to this using a Sequence Handler. The Sequence Handler ensures that a unique sequence number is added to each response message. If the responding application knows in advance that there will be a fixed number of multiple responses, then the Sequence Handler may use an N of M format to indicate how many response messages are to be expected.

Example: SOAP request message containing a message identifier
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:MsgHeader xmlns:n="http://example.org/requestresponse">
      <n:MessageId>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:MessageId>
    </n:MsgHeader>
  </env:Header>
  <env:Body>
    ........        
  </env:Body>
</env:Envelope>
Example: First SOAP response message containing sequencing and correlation to original request
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:MsgHeader xmlns:n="http://example.org/requestresponse">
      <!-- MessageId will be unique for each response message -->
      <!-- ResponseTo will be constant for each response message in the sequence-->
      <n:MessageId>uuid:09233523-567b-2891-b623-9dke28yod7m9</n:MessageId>
      <n:ResponseTo>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:ResponseTo>
    </n:MsgHeader>
    <s:Sequence xmlns:s="http://example.org/sequence">
      <s:SequenceNumber>1</s:SequenceNumber>
      <s:TotalInSequence>5</s:TotalInSequence>
    </s:Sequence>
  </env:Header>
  <env:Body>
    ........        
  </env:Body>
</env:Envelope>
Example: Final SOAP response message containing sequencing and correlation to original request
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:MsgHeader xmlns:n="http://example.org/requestresponse">
      <!-- MessageId will be unique for each response message -->
      <!-- ResponseTo will be constant for each response message in the sequence-->
      <n:MessageId>uuid:40195729-sj20-pso3-1092-p20dj28rk104</n:MessageId>
      <n:ResponseTo>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:ResponseTo>
    </n:MsgHeader>
    <s:Sequence xmlns:s="http://example.org/sequence">
      <s:SequenceNumber>5</s:SequenceNumber>
      <s:TotalInSequence>5</s:TotalInSequence>
    </s:Sequence>
  </env:Header>
  <env:Body>
    ........        
  </env:Body>
</env:Envelope>

3.7 S010 Request with acknowledgement

3.7.2 Description

Figure 7 Request with acknowledgement

Figure 7 illustrates a request/response scenario with the SOAP Sender requesting status information from the matching SOAP Receiver. This status may provide delivery information to the sender in addition to other business related responses that the receiving application may generate. Figure 7 assumes that the underlying transport protocol supports the request/response exchange model. A Status Handler is registered with the SOAP Sender and configured to request the status information. A matching handler on the SOAP Receiver generates the requested status information and places it in the response message which is then returned to the originating SOAP Sender.

In the example SOAP messages below, a StatusRequest header element includes an identifier for the message being sent. The inclusion of the StatusRequest header results in the receiving SOAP processor including a StatusResponse Header in the response. This includes information about the delivered message including an enumerated status and timestamp.

Example: SOAP request message with status request header
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:StatusRequest xmlns:n="http://example.org/status">
      <n:MessageId>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:MessageId>
    </n:StatusRequest>
  </env:Header>
  <env:Body>
    -----
  </env:Body>
</env:Envelope>
Example: SOAP response message containing delivery status for request
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:StatusResponse xmlns:n="http://example.org/status">
      <n:MessageId>uuid:09233523-567b-2891-b623-9dke28yod7m9</n:MessageId>
      <n:MessageStatus>DELIVERED</n:MessageStatus>
      <n:Timestamp>2001-03-09T12:22:30Z</n:Timestamp>
    </n:StatusResponse>
  </env:Header>
  <env:Body>        
    -----
  </env:Body>
</env:Envelope>

3.7 WS-Arch WG Specific

3.8 S030 Third party intermediary

3.8 Description

Figure 9 Marketplace intermediary

Figure 9 illustrates an infrastructure where SOAP based messaging is used to support a third party marketplace acting as an intermediary between buyers and sellers. The market place business model involves the recruitment of multiple suppliers for goods and services. Buyers may then connect to the marketplace and take advantage of the services they provide. The marketplace acts as a channel for the commercial transactions between a buyer and its chosen seller. A marketplace can exist to serve both B2B and B2C transactions.

In scenario S7, the marketplace acts as a blind intermediary. A buyer connects to the marketplace and places an order for items or services it requires. The buyer may be as simple as a browser or as complex as a procurement application. Once the marketplace has received the buyer's order, it contacts an appropriate set of sellers who then provide competitive bids against the order. The marketplace can then select the most attractive bid and connect the winning seller to the buyer. A purchasing process is then initiated with the marketplace acting as an intermediary in the transaction.

From a SOAP messaging point of view, the scenario illustrated in Figure 9 consists of a set of request/response messages between the buyer and the marketplace resulting in the buyer's order being registered. Once received, the marketplace then contacts its set of selected sellers again by a set of request/response messages. Design decisions made during the implementation of the marketplace software will determine whether supplier messages are sent from a single SOAP Sender to multiple SOAP Receivers, one at each of the seller's sites. Alternatively, a SOAP Sender could be instantiated for each supplier and a physical 1:1 relationship established. Prior agreements on message qualities such as reliability, security and structure would be put in place between the marketplace and its sellers. These qualities would define what additional SOAP Handlers were needed for the message exchange patterns between the marketplace and sellers.

3.10 S032 Caching

3.10.1 Scenario Definition

Some applications may wish to make caching possible for latency, bandwidth use or other gains in efficiency. To enable this, it should be possible to assign cacheability in a variety of circumstances. For example, "read" caching might be used to store messages at intermediaries for reuse in the response phase of the request/response message exchange pattern. Such caching might be on the scope of an entire message, a SOAP module, or scoped to individual SOAP module elements.

Similarly, "write" caching may be useful in situations when a request message in a request/response message exchange pattern (as well as similar messages in other message exchange patterns) does not need to be immediately forwarded or responded to. Such cacheability might be scoped by different methods, as outlined above.

Cacheability scoped by different elements might be associated by an attribute to the target element, through use of XML Query or XPath to describe the target elements in a header, or implied by the document schema, for example.

Cacheability mechanisms applied to messages, bodies or elements might include time-to-live (delta time), expiry (absolute time), entity validation, temporal validation, subscription to invalidation services, and object update/purge.

Finally, some applications may be capable of describing the dependencies and relationships between message elements. For example, a response element may be applicable to a wide range of requests; it would be beneficial to describe this element's relationship with request elements, so that it may satisfy a wide range of requests in an economical fashion. Similarly, the presence of a particular element may be a trigger for a cacheability mechanism to be applied to another element, such as validation or invalidation.

3.10 Description

Caching is frequently used as an optimization in distributed systems. It can be used to avoid re-doing computations or complex database access when the results remain valid for an extended period of time. In this case, subsequent requests for the same information can be served with the cached version rather than repeat the processing with the associated overheads. Another use of caching is in the transmission of data where copies may be held at leaf servers for local service provision rather than repeatedly access a central information repository. This has the combined effect of providing faster access to the information, reducing network bandwidth requirements and reducing the workload on a central server. Caching may be provided as part of an underlying transport infrastructure but in the case of this scenario, it is assumed that the caching is independent of any underlying transport.

An example of this kind of scenario is the caching of the response to a request in situations where a subsequent request can be safely answered with the same result. This example coincides with scenario S809 (Caching with expiry) where a catalog is updated at 8am each morning. Once the catalog has been updated, all price queries against it are valid until 8am the following day. If a price query request is repeated against the same item, then a cached response can be returned to the SOAP Sender otherwise the request is forwarded to the catalog server and its response is cached. All entries in the cache are purged at the time of the updated catalog being available. Figure 18 illustrates a possible architecture.

Figure 18 Result Caching

SOAP Application 1 initiates a request for catalog price information illustrated in the following example.

Example: SOAP request message for catalog price information
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Body>
    <c:CatalogPriceRequest xmlns:c="http://example.org/2001/06/catalog">
      <c:PartNumber>ABC-1234</c:PartNumber>
    </c:CatalogPriceRequest>
  </env:Body>
</env:Envelope>

The caching intermediary SOAP Application 2 is unable to fulfill the request from its local store so it forward the request which ultimately arrives at the catalog server SOAP Application 3. The catalog server process the request and assembles a response message containing the requested price information. An additional SOAP Header is placed in the response to control any caches that may exist in the return path. The CacheControl Header contains a CacheKey which allows matching of future requests to the cached response together with an Expires element that sets the time the local copy must be purged. This response is returned via the caching intermediary.

Example: SOAP response with caching header received by intermediary
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <ca:CacheControl xmlns:ca="http://example.org/2001/06/cache">
      <ca:CacheKey>ABC-1234</ca:CacheKey>
      <ca:Expires>2001-03-09T08:00:00Z</ca:Expires>
    </ca:CacheControl>
  </env:Header>
  <env:Body>
    <c:CatalogPriceResponse xmlns:c="http://example.org/2001/06/catalog">
      <c:PartNumber>ABC-1234</c:PartNumber>
      <c:PartPrice c:currency="USD">120.37</c:PartPrice>
    </c:CatalogPriceResponse>
  </env:Body>
</env:Envelope>

At the caching intermediary, the CacheControl header information is used to make a local copy of the response message, keyed by the CacheKey. The copy will be purged at the time specified by the Expires element. The CacheControl header element is removed by the intermediary and the catalog price information is returned to the original sender. The request/response path for this message is the complete roundtrip between the original SOAP Sender and SOAP Receiver and is shown by Message Path 1 in Figure 18.

Example: SOAP response with received by original Sender
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Body>
    <c:CatalogPriceResponse xmlns:c="http://example.org/2001/06/catalog">
      <c:PartNumber>ABC-1234</c:PartNumber>
      <c:PartPrice c:currency="USD">120.37</c:PartPrice>
    </c:CatalogPriceResponse>
  </env:Body>
</env:Envelope>

Since there is now a local copy of the price information for item ABC-1234 in the intermediary cache, subsequent requests for price information can be fulfilled by the intermediary. This is the shorter request/response path Message Path 2.

3.12 S036 Tracking

3.12 Description

Figure 19 Message Tracking

Scenario S805 describes a routing requirement which is addressed in detail by the WS-Routing [WS-Routing] (formerly SOAP-RP) specification. This describes how a message may be rerouted through some messaging infrastructure. Once the message has arrived at its ultimate receiver, the route the message has taken may be required for auditing purposes. A track of the message path may be created by adding a tracking header to the message in addition to any routing information.

This is illustrated in the following example. A routing header has been added to the message in accordance with WS-Routing [WS-Routing]. A TrackingHeader is used to maintain a list of Intermediary names and associated Timestamp elements. As the message passes through each intermediary, a Tracking Handler appends a Via element to the TrackingHeader. The Via element contains the name of the intermediary together with the date/time the message arrived or was forwarded by the intermediary. The list of Via elements therefore forms the audit trail for the message.

Example: SOAP request with routing and tracking headers
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <t:TrackingHeader xmlns:t="http://example.org/2001/06/tracking">
      <t:Via>
        <t:Intermediary>soap://A.example.com/some/endpoint</t:Intermediary>
        <t:Timestamp>2001-03-09T08:00:00Z</t:Timestamp>
      </t:Via>
      <t:Via>
        <t:Intermediary>soap://B.example.com</t:Intermediary>
        <t:Timestamp>2001-03-09T08:01:00Z</t:Timestamp>
      </t:Via>
      <t:Via>
        <t:Intermediary>soap://C.example.com</t:Intermediary>
        <t:Timestamp>2001-03-09T08:02:00Z</t:Timestamp>
      </t:Via>
      <t:Via>
        <t:Intermediary>soap://D.example.com/some/endpoint</t:Intermediary>
        <t:Timestamp>2001-03-09T08:03:00Z</t:Timestamp>
      </t:Via>
      </t:TrackingHeader>
      <wsrp:path xmlns:wsrp="http://schemas.xmlsoap.org/rp">
        <wsrp:action>http://www.im.org/chat</wsrp:action>
        <wsrp:to>soap://D.example.com/some/endpoint</wsrp:to>
        <wsrp:fwd>
          <wsrp:via>soap://B.example.com</wsrp:via>
          <wsrp:via>soap://C.example.com</wsrp:via>
        </wsrp:fwd>
        <wsrp:from>soap://A.example.com/some/endpoint</wsrp:from>
        <wsrp:id>uuid:84b9f5d0-33fb-4a81-b02b-5b760641c1d6</wsrp:id>
      </wsrp:path>
  </env:Header>
  <env:Body>
    .....
  </env:Body>
</env:Envelope>

3.14 S040 Conversational message exchange

3.14.2 Description

Figure 10 Conversational message exchange

Interactions between business partners are usually more complex than a single request/response message exchange. A long running set of message exchanges may, for example be used to implement a business interaction such as procurement of goods or services. In this case there are advantages in grouping individual messages into a longer running set of exchanges. Such an exchange of messages is known as a conversation. Conversations may continue between a pair of trading partners for a long time. Completion of a conversation instance may take days, weeks or months. In a procurement process, an example conversation may be:

  1. A buyer request a quotation for some goods, the seller responds with the quote.

  2. The buyer places a purchase order which the seller accepts.

  3. The seller informs the buyer of delivery dates, the buyer accepts.

  4. The buyer acknowledges delivery of the goods, the seller acknowledges.

  5. The buyer provides payment, the seller issue a receipt.

All of the example message exchanges are related an instance of any agreement between the two partners. For a message to be valid as part of the agreed rules, each partner has to check whether the current message is valid within the scope of the TPA.

Figure 10 illustrates how this scenario could be implemented. Each partner's SOAP processor has access to a database which is configured by the agreement agreed between the two partners. A Conversation State Handler in the SOAP Sender configures its SOAP Block with information that identifies a message with conversation instance it is part of. A matching handler in the SOAP Receiver uses the sender's information to test whether the received message is acceptable within the rules of the agreement. It does this by checking with its own rules database where the state information on each of the conversation instances currently active is stored. If a message violates the rules of the agreement, then the application can raise a fault condition.

Note that Figure 10 does not include handlers for other message headers to support reliability or security which may be required under the agreement.

In the following request and response examples, a ConversationState Header is used to identify which agreement governs the exchange between the two trading partners (AgreementId). To support multiple concurrent conversations under the same agreement, a ConversationId element is included. The values of AgreementId and ConversationId will remain constant for the lifetime of a particular conversational exchange and will appear in both request and response messages.

Example: SOAP request message as part of a conversational exchange
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:ConversationState xmlns:n="http://example.org/conversation">
      <n:AgreementId>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:AgreementId>
      <n:ConversationId>uuid:02957815-38fh-39gp-0dj2-dm20fusy1n5j</n:ConversationId>
    </n:ConversationState>
  </env:Header>
  <env:Body>
    -----
  </env:Body>
</env:Envelope>
Example: SOAP response message as part of a conversational exchange
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:ConversationState xmlns:n="http://example.org/conversation">
      <n:AgreementId>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:AgreementId>
      <n:ConversationId>uuid:02957815-38fh-39gp-0dj2-dm20fusy1n5j</n:ConversationId>
    </n:ConversationState>
  </env:Header>
  <env:Body>
    -----
  </env:Body>
</env:Envelope>

3.14 WS-Arch WG Specific

3.15 S061 Request with encrypted payload

3.15.2 Description

Figure 8 Request with encrypted payload

Scenario S061 describes two applications that wish to share encrypted data as an opaque body in a SOAP message. It places no requirements on the SOAP messaging layer. Figure 8 illustrates this scenario.

Example: Plaintext SOAP message
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Body>
    <m:PurchaseTicket xmln:m="some-URI">
      <m:PNR>ABCDEFGH</m:PNR>
      <m:CreditCard>4500123456789abc</m:CreditCard>
    </m:PurchaseTicket>
  </env:Body>
</env:Envelope>

The following is the encrypted version of the above plain SOAP message. The body entry <m:PurchaseTicket> is encrypted using a symmetric key identified by the key name "Symmetric Key" and replaced by the <xenc:EncryptedData> element with an id "encrypted-body-entry". A <sec:Encryption> header entry for this encrypted data is added to the SOAP header. Note that the <sec:EncryptedDataList> element in the header entry has a reference to the <xenc:EncryptedData> element. The symmetric key used for encryption is stored in the <xenc:EncryptedKey> element in the header entry in an encrypted form, that is, it is encrypted by John Smith's RSA public key.

Example: Encrypted SOAP message
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <sec:Encryption xmlns:sec="http://schemas.xmlsoap.org/soap/security/2000-12"
                       env:actor="some-URI"
                       env:mustUnderstand="true">
      <sec:EncryptedDataList>
        <sec:EncryptedDataReference URI="#encrypted-body-entry"/>
      </sec:EncryptedDataList>
      <xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
                            Id="EK"
                            CarriedKeyName="Symmetric Key"
                            Recipient="John Smith">
        <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
        <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
          <ds:KeyName>John Smith's RSA Key</ds:KeyName>
        </ds:KeyInfo>
        <xenc:CipherData>
          <xenc:CipherValue>ENCRYPTED 3DES KEY......</xenc:CipherValue>
        </xenc:CipherData>        
        <xenc:ReferenceList>
          <xenc:DataReference URI="#encrypted-body-entry"/>
        </xenc:ReferenceList>
      </xenc:EncryptedKey>
    </sec:Encryption>
  </env:Header>
  <env:Body>
    <xenc:EncryptedData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
                           Id="encrypted-body-entry"
                           Type="http://www.w3.org/2001/04/xmlenc#Element">
    <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
      <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
        <ds:RetrievalMethod URI="#EK" Type="http://www.w3.org/2001/04/xmlenc#EncryptedKey"/>
        <ds:KeyName>Symmetric Key</ds:KeyName>
      </ds:KeyInfo>
      <xenc:CipherData>
        <xenc:CipherValue>ENCRYPTED BODY ENTRY......</xenc:CipherValue>
      </xenc:CipherData>        
    </xenc:EncryptedData>
  </env:Body>
</env:Envelope>

3.15 WS-Arch WG Specific

3.16 S062 Message header and payload encryption

3.16 Description

Figure 11 Header and payload encryption

In scenario S061, two applications communicated using encrypted payloads. These opaque payloads had no impact on the SOAP processing layer. In this scenario, the action of signing and/or encrypting the headers or payload is the responsibility of the SOAP processing layer. Figure 11 illustrates how the encryption agreements are accessible to a Message Signing Handler on the SOAP Sender and a matching Message Verification Handler on the SOAP Receiver. An additional Message Routing Header may also be part of the SOAP message. This header may also be signed and verified if needed by the security requirements of the message exchange.

3.21 S070 Asynchronous messaging

3.21.2 Description

Figure 13 Asynchronous messaging

Scenario DS17 is the same as the basic request/response pattern described in scenario S3. The difference is that the request and response messages are separated in time and implemented as two unidirectional messages. The sending SOAP Application does not block and wait for the response to return. The sending SOAP Application is notified when a response is received by its SOAP Receiver. It then uses the correlation information within the received message to match the response to a message it sent some time earlier.

Figure 11 illustrates a possible implementation. In the request SOAP message, a Message Identifier Handler is responsible for generating a unique message identifier and inserting it into a SOAP Header. This forms part of the SOAP request message and is sent from SOAP Application 1 to the receiving SOAP Application 2. The request message is processed by a business application and a response message is assembled. This includes a SOAP Header built by a Message Correlation Handler which links the response message to its associated request.

Example: SOAP asynchronous request message containing a message identifier
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:MsgHeader xmlns:n="http://example.org/requestresponse">
      <n:MessageId>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:MessageId>
    </n:MsgHeader>
  </env:Header>
  <env:Body>
      ........
  </env:Body>
</env:Envelope>
Example: SOAP asynchronous response message containing correlation to original request
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:MsgHeader xmlns:n="http://example.org/requestresponse">
      <n:MessageId>uuid:09233523-567b-2891-b623-9dke28yod7m9</n:MessageId>
      <n:ResponseTo>uuid:09233523-345b-4351-b623-5dsf35sgs5d6</n:ResponseTo>
    </n:MsgHeader>
  </env:Header>
  <env:Body>
      ........
  </env:Body>
</env:Envelope>

3.21 WS-Arch WG Specific

3.24 S090 Sending non-XML data

3.24.2 Description

Figure 14 Sending non-XML data

Support for non-XML data has been described elsewhere. The SOAP with Attachments [SwA] note to the W3C has been adopted by the ebXML Message Services specification [ebXML MSS] as the basis for defining a message structure which can support non-XML data. Supporting non-XML data requires additional packaging of the message which can be provided by a MIME multipart structure and impacts the binding of a message to its underlying transport protocol. Figure 14 illustrates a unidirectional SOAP message path. A Message Manifest Handler is implemented which creates a set of references to the different parts of a multipart MIME package. Each part is referenced by its content identifier.

Figure 15 Using MIME packaging for non-XML data

Figure 15 illustrates how different parts of a message are packaged using MIME multipart. The outermost MIME envelope packages a set of individual MIME parts. The first MIME part contains a SOAP message which includes the Manifest Header block created by the Message Manifest Handler. The second and subsequent MIME parts contain payload(s) which may be XML documents or any other MIME content type such as image, audio or video data. The SOAP manifest header can contain elements that reference the separate MIME parts using their content identifiers. This may be achieved using XLink references as shown in the following example. The XLink role attribute may be used to further qualify the type of data contained within the payload.

Example: SOAP message containing a manifest for non-XML data
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <n:Manifest xmlns:n="http://example.org/manifest">
      <n:Reference n:id="image01" 
                      xlink:href="cid:payload-1"
                      xlink:role="http://example.org/image">
        <n:Description>My first holiday photograph</n:Description>
      </n:Reference>
      <n:Reference n:id="image02"
                      xlink:href="cid:payload-2"
                      xlink:role="http://example.org/image">
        <n:Description>My second holiday photograph</n:Description>
      </n:Reference>
    </n:Manifest>
  </env:Header>
  <env:Body>
    ........        
  </env:Body>
</env:Envelope>

3.24 WS-Arch WG Specific

3.25 S091 Incremental parsing/processing of SOAP messages

3.25 Description

Scenario S21 requires the incremental parsing and processing of a SOAP message by a receiver. This is a general scenario with memory-limited processor requirements forming a subset of the scenario. If the SOAP Body contains a large amount of data, then it may be processed incrementally by a SAX parser if the data is chunked as in the following example. The SAX parser will have a handler triggered by the BodyDataChunk element.

Example: Final SOAP response message containing sequencing and correlation to original request
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Header>
    <!--Set of headers processed before Body -->
  </env:Header>
  <env:Body>
    <b:BodyDataChunk xmlns:s="http://example.org/2001/06/chunking">
      <b:DataLength>1024</b:DataLength>
      <b:Data>kfkk34jkhfSomeBase64EncodedDatajdsgkjgjajgo34093589uvsjv.....jhfjhf350giqhf</b:Data>
    </b:BodyDataChunk>
 
    <!-- More BodyDataChunk elements -->
 
    <b:BodyDataChunk xmlns:s="http://example.org/2001/06/chunking">
      <b:DataLength>1024</b:DataLength>
      <b:Data>oqjrj45cmoLastLotOfBase64EncodedData12r9vnhofjhckzlmxjws.....skfjk23ogkkjhq</b:Data>
    </b:BodyDataChunk>
  </env:Body>
</env:Envelope>

If a SOAP request is being streamed and processed incrementally, then the matching response message may be streamed to the original sender. In this case, the design of the receiving application is critical with respect to timing and error handling.

  1. If errors are generated by the SOAP request Headers, then a SOAP Fault is inserted in the response and processing of the request message is terminated.

  2. The SOAP receiving application may treat each BodyDataChunk element as atomic. A positive or negative acknowledgement is streamed to the SOAP response depending on whether the BodyDataChunk element was successfully processed or not. The SOAP response message is terminated once the end of the SOAP request is reached.

  3. Alternatively, the SOAP receiving application may process each BodyDataChunk until either the end of the SOAP request is received or a fault occurs. In the case of a fault, a SOAP Body fault element is streamed to the SOAP response and processing of the SOAP request is terminated.

3.27 S200 Event notification

3.27 Description

Figure 17 Publish and subscribe

Scenario S23 describes event notification using a publish subscribe mechanism. An implementation of this scenario uses an example of the request/response scenario S3 to register a subscription and fire-and-forget to multiple receivers scenario S2 for the notification. Figure 17 illustrates how a request/response message pattern can be used with a Subscription Request Handler to register an interest (or subscription) in some set of events. The registration is made with some subscription service. The success or otherwise of the registration is returned to the subscribing application using a Subscription Ack Handler which provides an acknowledgement to the subscribing application.

Delivery of an event notification to a set of subscribers may be implemented using the fire-and-forget to multiple receivers scenario S2. The subscription service provides the list of valid applications that have registered an interested in a particular event. This list may then be converted into a group address or distribution list to support the implementation of the fire-and-forget scenario.

A subscription request may include a list of events within the SOAP Body as in the following example.In this example, a subscription is registered with a stock price notification service. The subscribing application will be informed of company BigCo's stock price, volume traded and time whenever the price is greater than 100.

Example: SOAP event subscription request message
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Body>
    <s:StockNotificationSubscription xmlns:s="http://example.org/2001/06/subscribe">
      <s:Notify>PRICE</s:Notify>
      <s:Notify>VOLUME</s:Notfy>
      <s:Notify>TIMESTAMP</s:Notfy>
      <s:When>
        <s:Company>BigCo</s:Company>
        <s:Price range="GreaterThan">100</s:Price>
      </s:When>
    </s:StockNotificationSubscription>
  </env:Body>
</env:Envelope>

An acknowledgement may include an identifier to the subscription as in the following example:

Example: SOAP event subscription acknowledgement response
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Body>
    <s:StockNotificationSubscriptionAck xmlns:s="http://example.org/2001/06/subscribe">
      <s:SubscriptionId> uuid:40195729-sj20-pso3-1092-p20dj28rk104</s:SubscriptionId>
    </s:StockNotificationSubscriptionAck>
  </env:Body>
</env:Envelope>

The identification may be used in subsequent notifications to the application as a result of the subscription:

Example: SOAP event notification
<?xml version="1.0" ?>
<env:Envelope xmlns:env="http://www.w3.org/2002/06/soap-envelope">
  <env:Body>
    <n:StockNotification xmlns:n="http://example.org/2001/06/notification">
      <n:SubscriptionId> uuid:40195729-sj20-pso3-1092-p20dj28rk104</n:SubscriptionId>
      <n:Company>BigCo</n:Company>
      <n:Price>100.56</n:Price>
      <n:Volume>102345</n:Volume>
      <n:Timestamp>2001-03-09T12:22:30Z</n:Timestamp>
    </n:StockNotification>
  </env:Body>
</env:Envelope>

3.35 S505 Classification system for operations

3.35.2 Description

Imagine a component framework in which components and their operations (building finally the component's functionality) should be described with WSDL. In the framework the components are using operations from each other dynamically: in the program code there is no "hard-wired" function call but instead a "semantic description/reference" of what kind of operation to use, which will be dissolved just in time before execution. With this "semantic description" a search for suitable operations could be started in a (logical) centralized registry (maybe with UDDI). The registry contains (WSDL) information of all currently available components/operations within the framework. Result of the search query are the concrete binding parameters (protocol, URL, operation signature, etc.) of the matching operations. Finding a suitable match _automatically_ (without manual/human interaction) will be done by searching in the registered WSDL files for the specified "semantic description". One half of this "semantic description" are the parameters defined with complex XML schema types. The other one should be the determination of the operation (i.e. its functionality). But only considering the operation name has the same drawbacks as comparing parameters only by their name (or even simple types like integer, string, etc.): only operations with exactly the same name as chosen from the operation's programmer are returned. So with introducing a kind of "type system" for operations (or maybe a classification) would bring the benefit that the result set of the above mentioned query could return operations with different names, but which are implementing the same functionality/behavior. With this it would also be possible to exchange one component (respectively their operation/s) with another independently developed one, which has the same functionality but with (maybe only slightly) different operation name(s) - and this without further manual interaction.

3.35 WS-Arch WG Specific

3.36 S510 Quality of service

3.36 Description

A SOAP header block is one possible approach to implementing this scenario. The SOAP 1.2 specification does not define this hypothetical SOAP Quality Of Service (QoS) block. An initial SOAP sender sends a SOAP message containing a QoS header block through one or more SOAP intermediaries to an ultimate SOAP receiver. The intermediary is targeted by the initial SOAP sender from within the SOAP message by inserting a role attribute within the QoS Block to be used at the SOAP intermediary as described in the SOAP processing model (Part 1, section 2.5). The SOAP specifications do not state how the role attribute is to be used by the SOAP sender. Potentially, it can be used in the context of the SOAP binding framework to provide a hint for message routing. However, message routing is not within the scope of the SOAP 1.2 specifications. The SOAP intermediary must examine the SOAP QoS Block, and determine how to invoke the QoS capabilities exposed via the SOAP binding. If the SOAP QoS Block is marked mustUnderstand, then the intermediary is expected to be QoS-aware. If it is not QoS-aware, then a SOAP fault is generated, as this mandatory header cannot be processed. If it is QoS-aware, but cannot honor the specific QoS parameters carried in the QoS Block, then any fault or other response to the sender or elsewhere (e.g., log file) is not defined in the SOAP specifications. The specification of the QoS extension, when defined, would need to describe error handling, negotiations, or other processing under all circumstances.

If the intermediary is QoS-aware, then presumably the information in the QoS Block is used when forwarding the SOAP message further along on its message path toward the ultimate SOAP receiver. In addition to the use of SOAP Blocks to extend the functionality of SOAP, this scenario may also require extensions to the HTTP binding, or a completely new binding. The Binding Framework allows for additional properties, outside the SOAP envelope, that may be required to invoke the lower layer QoS mechanisms. Additional properties (within the Binding Framework) may be required. For sake of discussion, lets assume that the SOAP node will send the SOAP message using HTTP, but traffic classification of this HTTP flow would be done using diffserv so particular per-hop behaviors can be used within the network en-route to the next SOAP node. Traffic classification for diffserv can be done by the SOAP node sending the SOAP message, or by network devices (assuming they know how to recognize the particular HTTP flow). If traffic classification is handled by a network device, perhaps communications would be needed between the SOAP node and the network device, for example, to provide the network device with the TCP/IP port numbers and IP addresses of the HTTP connection. This would presume some way to obtain this port and address information, which probably involves an API or properties that are beyond the scope of the SOAP 1.2 specifications.

For example, to state that a separate spec can define properties in accordance with the binding framework to extend the capability of the HTTP binding (or any other binding). In the case of SOAP RPC, a QoS extension at the ultimate SOAP receiver may attempt to insert a QoS Block in RPC response. The RPC response may succeed, but perhaps the desired QoS cannot be delivered on the return message path. It is not clear if a SOAP fault should be generated. Likewise, if a SOAP Intermediary on the return message path cannot honor the QoS Block (assumed to be marked mustUnderstand), is it permissible to convert the SOAP RPC response to a SOAP fault? A SOAP extension in the initial SOAP sender is needed to insert this SOAP QoS Block. The sender may need to use properties as defined by the SOAP binding framework to communicate QoS parameters to be used by the underlying network. Since a SOAP binding must define the rules for how the data is exchanged using the underlying protocol, a custom or supplemental binding may be required to support this QoS usage scenario. The HTTP binding described in the SOAP 1.2 specification does not explicitly support QoS properties. The SOAP 1.2 specification does not preclude extensions to this HTTP binding, which would provide the capability to define either QoS properties or a requirement to examine the SOAP envelope (i.e., SOAP QoS Block) to determine the QoS used for transmission. Alternatively, a completely new binding can be specified that includes QoS explicitly, rather than as an extension to an existing binding

4 References

Editorial note: HH2002-07-16
This section needs some clean up.

4.1 Informative References

ebXML MSS
ebXML Message Service Specification v2.0, OASIS Approved Draft, D. Fischer, et al, 1 April 2002. (See http://www.oasis-open.org/committees/ebxml-msg/documents/ebMS_v2_0.pdf.)
SwA
SOAP Messages with Attachments, W3C Note J. Barton, S. Thatte, H. Nielsen, 11 December 2000 (See http://www.w3.org/TR/2000/NOTE-SOAP-attachments-20001211.)
WS-Routing
Web Services Routing Protocol (WS-Routing), H. Nielsen, S. Thatte, 23 October 2001. (See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnglobspec/html/wsroutspecindex.asp.)
WSA Charter
Web Services Architecture Charter (See http://www.w3.org/2002/01/ws-arch-charter.)
XMLP Reqs
XML Protocol (XMLP) Requirements, W3C Working Draft, D. Fallside, et al, 26 June 2002. (See http://www.w3.org/TR/2002/WD-xmlp-reqs-20020626.)
XMLP US
XML Protocol Usage Scenarios, W3C Working Draft, J. Ibbotson, 17 December 2001 (See http://www.w3.org/TR/2001/WD-xmlp-scenarios-20011217/.)

A Acknowledgments (Non-Normative)

A large part of this document was excerpted from the XML Protocol Usage Scenarios[XMLP US], edited by John Ibbotson.

The editors would like to thank the following Working Group members for their contributions to this document: Roger Cutler.

@@@ Insert WG membership here

B Web Services Architecture Usage Scenarios Changes (Non-Normative)

2003-04-15 HH Addressed issue 13. Added diagrams for travel use case. Started addressing issue 26: s/confirmation number/confirmation identifier/.
20030409 DBO Added static travel agent use case
20020716 HH Worked on the travel agent service scenario. Added more references to security use cases.
20020713 HH Integrated new version of S061 and S062, and S0621 from DBO.
20020619 HH Imported Hugo Haas's travel agent use case and Roger Cutler's EDI-like Purchasing use case.
20020420-20020501 DBO Converted to WS Arch document, added wsd usage scenarios, did personal edits on various scenarios to make more generic, re-organized numbering, added numerous scenarios (security, asynchrony, transactions, discovery), created template, put in first swag at requirements, priorities, candidate technologies
20030923 HHe Moved use cases to the front. Added use case citations to cited scenarios. Minor wording changes to introduction.