WSRA Scenario

Editor's Draft $Date: 2011/09/23 13:19:06 $

Latest version:
http://www.w3.org/TR/wsra-scenarios
Previous version:
http://www.w3.org/TR/2009/WD-wsra-scenarios-20090317
Editor:
Gilbert Pilz, Oracle

Abstract

The following scenario is designed to provide a framework in which to test the interoperability of various WS-Eventing implementations. Because this scenario and the tests defined within it will be used to judge which features of WS-Eventing are implemented and which are not, the feature coverage is intended to be complete.

Status of this Document

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

Table of Contents

1 Dependencies
   1.1 Scope
   1.2 XML Namespaces
   1.3 Preconditions
2 Notations and Terminology
   2.1 Notational Conventions
3 Scenario Description
   3.1 Predefined Animals/Tags
   3.2 Events
   3.3 Structure of Test Sections
   3.4 Scenario Header
4 WS-MetadataExchange Tests
   4.1 GetWSDL Test
   4.2 Empty GetMetadata Test
   4.3 WSDL GetMetadata Test
   4.4 Unknown GetMetadata Test
   4.5 MultiMetadata GetMetadata Test
   4.6 PutMetadata Test
   4.7 DeleteMetadata Test
5 WS-Eventing Tests
   5.1 Basic Test
   5.2 Wrapped Notifications
   5.3 Duration Expiration Test
   5.4 Specific Time Expiration Test
   5.5 Best Effort Expiration Test
   5.6 Renew Test
   5.7 SubscriptionEnd Test
   5.8 Filter Test - XPath 1.0
   5.9 Filter Test - XPath 2.0
   5.10 Non-Addressable Event Sink Test
6 WS-Transfer/WS-Fragment Tests
   6.1 Create Test
   6.2 Get Test
   6.3 Fragment Get Test
   6.4 Put Test
   6.5 Fragment Put Test
   6.6 Delete Test
7 WS-Enumeration Tests
   7.1 Basic Test
   7.2 New Empty Enumeration Test
   7.3 Optimized Enumeration Test
   7.4 MaxCharacters Test
   7.5 MaxTime Test
   7.6 Duration Expiration Test
   7.7 Specific Time Expiration Test
   7.8 Best Effort Expiration Test
   7.9 GetStatus Test
   7.10 Renew Test
   7.11 Release Test
   7.12 EnumerationEnd Test
   7.13 Filter Test - XPath 1.0
   7.14 Filter Test - XPath 2.0
8 WS-SOAP Assertions & WS-Event Descriptions
9 WSDL
   9.1 Event Source WSDL
   9.2 Notification WSDL
10 EventDescriptions
11 Schemas
12 Acknowledgements
13 References
   13.1 Normative References

Appendices

A XML Schema
B Change Log


1 Dependencies

2 Notations and Terminology

This section specifies the notations, namespaces, and terminology used in this specification.

2.1 Notational Conventions

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC 2119].

This specification uses the following syntax to define normative outlines for messages:

  • The syntax appears as an XML instance, but values in italics indicate data types instead of values.

  • Characters are appended to elements and attributes to indicate cardinality:

    • "?" (0 or 1)

    • "*" (0 or more)

    • "+" (1 or more)

  • The character "|" is used to indicate a choice between alternatives.

  • The characters "(" and ")" are used to indicate that contained items are to be treated as a group with respect to cardinality or choice.

  • The characters "[" and "]" are used to call out references and property names.

  • Ellipsis (i.e. "...") indicate a point of extensibility.

3 Scenario Description

This scenario presupposes a cetacean tracking system in which a number of animals have been 'tagged' with devices that track their location. These tags periodically communicate via satellite to a central system. External systems can consume this information by using WS-Eventing to subscribe to periodic notifications about the locations of the tags and, presumably, the animals they are attached to. Systems may also query for the current data associated with an animal via WS-Enumeation, to enumerate the list of animals, or WS-Transfer/Fragment to retrieve the information about one particular animal. By using WS-MetadataExchange a client can determine which of the various WS-RA specifications are supported.

A set of properties is maintained for each animal that is tagged. The following properties are stored:

Table 3-1: Properties for each animal
Property Description Example
ID A GUID that uniquely identifies the animal 13c76450-de3d-11df-85ca-0800200c9a66
Name The name given to the animal Howard
Birthdate The day on which the animal was born 2006-12-08
Gender The gender of the animal Male
Family The Family of which the animal is a member Eschrichtiidae
Genus The Genus of which the animal is a member Eschrichtius
Species The Species of which the animal is a member robustus
Current Location The current GPS location of the animal

The XML representation of each tag will match the following pseudo-schema:

<sce:Animal ...>
  <sce:ID> xs:string </sce:ID>
  <sce:Name> xs:string </sce:Name>
  <sce:Birthdate> xs:dateTime </sce:Birthdate>
  <sce:Gender> xs:string </sce:Gender>
  <sce:Family> xs:string </sce:Family>
  <sce:Genus> xs:string </sce:Genus>
  <sce:Species> xs:string </sce:Species>
  <sce:CurrentLocation> xs:any </sce:CurrentLocation>
  <sce:EPR> wsa:endpoint-reference to this Animal </sce:EPR> ?
  <sce:History>
    <sce:Entry Date="xs:date"? Who="xs:string"? ...> xs:string </sce:Entry> *
  <sce:/History>
  xs:any
</sce:Animal> 

The location of the tags is expressed in GPS coordinates using the GPS eXchange Format, an XML schema designed as a common GPS data format for software applications. In addition to the basic GPS information (latitude, longitude, elevation, and time), the Animal's XML represenation includes an ID that uniquely identifies the tag and, by inference, the animal that the tag is attached to.

4 WS-MetadataExchange Tests

This sections describes the tests for WS-MetadataExchange. These tests are focused on testing the protocol itself and not necessarily on the metadata transported via the protocol.

4.3 WSDL GetMetadata Test

This test verifies the ability to retrieve Metadata using the GetMetadata operation. In this test the client will specifically ask for the WSDL of the service.

4.3.4 Variations

  1. The GetMetadata request contains a Dialect@Content attribute set to 'EPR'. The response will either be a MetadataSection with a reference/EPR to the WSDL, or no MetadataSecton at all for this Type/Identifier/Content triplet.

  2. The GetMetadata request contains a Dialect@Content attribute set to 'URI'. The response will either be a MetadataSection with a reference/URI to the WSDL, or no MetadataSecton at all for this Type/Identifier/Content triplet.

  3. The GetMetadata request contains a Dialect@Content attribute set to 'Metadata'. The response will either be a MetadataSection with a the WSDL, or no MetadataSecton at all for this Type/Identifier/Content triplet.

  4. The GetMetadata request contains a Dialect@Content attribute set to 'Any'. The response will either be a set of MetadataSections with a references to the WSDL, or the WSDL itself. Note that the exact set is service specific and can be empty.

  5. The GetMetadata request contains a Dialect@Content attribute set to 'All'. The response will either be a set of MetadataSections with a references to the WSDL, or the WSDL itself. Note, that the result will contain all possible forms of the WSDL. The result will include all forms of WSDL returned by the previous variations.

  6. The GetMetadata request contains a Dialect@Identifier attribute. The result will only contain WSDL documents that match this value.

  7. The GetMetadata request contains a Dialect@Identifier attribute. The result will only contain WSDL documents that match this value.

  8. The GetMetadata request contains a GetMetadata@Content attribute but the Dialect@Content attribute is absent. The result should match the @Content value specified.

  9. The GetMetadata request contains a GetMetadata@Content attribute set to an unknown URI. The result should not contain any metadata.

5 WS-Eventing Tests

This section describes the tests for WS-Eventing except for those (such as the use of EventDescriptions or Notification WSDLs) that affect only the process of developing one or more of the components of a WS-Eventing-based system.

5.1 Basic Test

This test verifies the ability to subscribe and receive notifications. The initial Subscribe request has the following features:

5.3 Duration Expiration Test

This test verifies the correct implementation of the expiration feature on the Event Source/Subscription Manager. The initial Subscribe message has the following features:

5.5 Best Effort Expiration Test

This test verifies the correct implementation of the 'best effort' expiration feature on the Event Source/Subscription Manager. The initial subscription has the following features:

5.6 Renew Test

This test verifies the ability of a Subscriber to update the expiration time of a Subscription via a Renew request. The initial Subscribe request has the following features:

The Renew request has the following features:

5.7 SubscriptionEnd Test

This test verifies the correct implementation of the SubscriptionEnd feature for both the Subscription Manager and the target of the SubscriptionEnd message. The initial Subscribe request has the following features:

Note: this test requires the client to include an additional element in the sce:Scenario header:

The duration/time specified by this element indicates when the event source is to "unexceptedly" terminate the subscription, thus causes the SubscriptionEnd message to be sent. The value specified in this element must be less than the expires time specified in the Subscribe request message.

5.8 Filter Test - XPath 1.0

This test verifies the ability of the Event Source/Subscription Manager to correctly implement XPath 1.0 filters. The initial Subscribe request has the following features:

5.9 Filter Test - XPath 2.0

This test verifies the ability of the Event Source/Subscription Manager to correctly implement XPath 2.0 filters. The initial Subscribe request has the following features:

6 WS-Transfer/WS-Fragment Tests

This section describes the tests for WS-Transfer and WS-Fragment.

6.5 Fragment Put Test

This test verifies the ability of a client to update a portion of the current representation of an Animal/Tag. The endpoint to which this test is executed against may be any valid endpoint created during the Create test or returned from any other test described in this document as long as it refers to an Animal resource. The use of WS-MetadataExchange is recommeneded to ensure that the endpoint supports WS-Transfer.

6.5.4 Variations

Except when noted, the following variations use this Animal representation as an example guide for what each variation is expected to produce:

The following Fragment Put expressions/values are tested:

  1. Mode: Add
    Expression: /
    Value: <sce:Animal> ... </sce:Animal>
    Result: a fault is generated

  2. Mode: Replace
    Expression: /
    Value: <sce:Animal> ... </sce:Animal>
    Result: entire Animal is replaced

  3. Mode: Add
    Expression: //*[local-name()='History']/*[1]
    Value: Date="..."
    Result: first History/Entry has a Date attribute added

  4. Mode: Add
    Expression: //*[local-name()='History']/*[2]
    Value: Date="..."
    Result: a fault is generated

  5. Mode: Replace
    Expression: //*[local-name()='History']/*[2]/@Date
    Value: Date="..."
    Result: Date attribute is updated

  6. Mode: Replace
    Expression: //*[local-name()='History']/*[2]/@Date
    Value: Who="..."
    Result: Date attribute is erased and Who attribute is added

  7. Mode: Replace
    Expression: //*[local-name()='History']/*[1]/@Date
    Value: Who="..."
    Result: Who attribute is added to the Entry

  8. Mode: Remove
    Expression: //*[local-name()='History']/*[2]/@Date
    Value: -
    Result: Date attribute is removed

  9. Mode: Add
    Expression: //*[local-name()='History']
    Value: <sce:Entry> ... </sce:Entry>
    Result: Entry is added to History array
    History array needs to be empty before test starts

  10. Mode: Add
    Expression: //*[local-name()='History']
    Value: <sce:Entry> ... </sce:Entry>
    Result: Entry is added to the end of the History array
    History array needs to have atleast one Entry

  11. Mode: Replace
    Expression: //*[local-name()='History']/*[local-name()='Entry']
    Value: <sce:Entry> ... </sce:Entry>
    Result: First Entry is replaced
    History array needs to have one Entry

  12. Mode: Replace
    Expression: //*[local-name()='History']/*[1]
    Value: <sce:Entry> ... </sce:Entry>
    Result: Entry is added to the History array
    History array needs to be empty before test starts

  13. Mode: InsertAfter
    Expression: //*[local-name()='History']/*[local-name()='Entry']
    Value: <sce:Entry> ... </sce:Entry>
    Result: Entry is added to the end of the History array

  14. Mode: InsertBefore
    Expression: //*[local-name()='History']/*[local-name()='Entry']
    Value: <sce:Entry> ... </sce:Entry>
    Result: Entry is added to the start of the History array

  15. Mode: Replace
    Expression: //*[local-name()='History']/*[local-name()='Entry']
    Value: <sce:Entry> ... </sce:Entry>
    Result: All old Entries are replace by this one Entry

  16. Mode: Replace
    Expression: //*[local-name()='History']/*[1]
    Value: <sce:Entry> ... </sce:Entry>
    Result: First Entry is replaced

  17. Mode: Remove
    Expression: //*[local-name()='History']/*
    Value: -
    Result: All Entry elements are removed
    History array needs to have one Entry

  18. Mode: Remove
    Expression: //*[local-name()='History']/*
    Value: -
    Result: All Entry elements are removed

  19. Mode: Remove
    Expression: //*[local-name()='History']/*[1]
    Value: -
    Result: Just first Entry is removed

  20. Mode: InsertBefore
    Expression: //*[local-name()='History']/*[local-name()='Entry']
    Value: <sce:Entry> ... </sce:Entry>
    Result: New Entry is added to History array
    History array needs to be empty before test starts

  21. Mode: InsertAfter
    Expression: //*[local-name()='History']/*[local-name()='Entry']
    Value: <sce:Entry> ... </sce:Entry>
    Result: New Entry is added to History array
    History array needs to be empty before test starts

7 WS-Enumeration Tests

This section describes the tests for WS-Enumeration.

7.4 MaxCharacters Test

This test verifies the ability of a data consumer to limit the size of the items returned from an enumeration using the wsen:MaxCharacters element. The initial Enumerate request has the following salient features:

The subsequent Enumerate requests have the following salient features:

7.5 MaxTime Test

This test verifies the ability of a data consumer to limit the amount of time it takes for the data source to assemble an EnumerateResponse using the wsen:MaxTime element. The initial Enumerate request has the following salient features:

The second Enumerate request has the following salient features:

The subsequent Enumerate requests have the following salient features:

7.12 EnumerationEnd Test

This test verifies the ability of a data source to send a notification to a data consumer if it terminates the enumeration unexpectedly. The initial Enumerate request has the following salient features:

Note: this test requires the client to include an additional element in the sce:Scenario header:

The duration/time specified by this element indicates when the data source is to "unexceptedly" terminate the enumeration, thus causes the EnumerationEnd message to be sent. The value specified in this element must be less than the expires time specified in the Enumerate request message used to create the enumeration.

7.13 Filter Test - XPath 1.0

This test verifies the ability of the data source to correctly implement XPath 1.0 filters. The initial Enumerate request has the following salient features:

The subsequent Enumerate requests have the following salient features:

7.14 Filter Test - XPath 2.0

This test verifies the ability of the data source to correctly implement XPath 2.0 filters. The initial Enumerate request has the following salient features:

The subsequent Enumerate requests have the following salient features:

8 WS-SOAP Assertions & WS-Event Descriptions

While this working group will not explicitly test the use of WS-Policy, this test scenario allows for the inclusion of the WS-SA and WS-EVD policy assertions to appear in the WSDL of the Tracker Service. In doing this the scenario is verifying that the assertions can successfully be included as part of the WSDL/Policy of a service.

9 WSDL

10 EventDescriptions

Available here: http://www.w3.org/2002/ws/ra/test/scenario/scenarioSource.evd

11 Schemas

TBD

12 Acknowledgements

This specification has been developed as a result of joint work with many individuals and teams, including: Alessio Soldano (Red Hat), Ashok Malhotra (Oracle Corp.), Asir Vedamuthu (Microsoft Corp.), Bob Freund (Hitachi, Ltd.), Bob Natale (MITRE Corp.), David Snelling (Fujitsu, Ltd.), Doug Davis (IBM), Fred Maciel (Hitachi, Ltd.), Geoff Bullen (Microsoft Corp.), Gilbert Pilz (Oracle Corp.), Greg Carpenter (Microsoft Corp.), Jeff Mischkinsky (Oracle Corp.), Katy Warr (IBM), Li Li (Avaya Communications), Mark Little (Red Hat), Martin Chapman (Oracle Corp.), Paul Fremantle (WSO2), Paul Nolan (IBM), Prasad Yendluri (Software AG), Ram Jeyaraman (Microsoft Corp.), Sreedhara Narayanaswamy (CA), Sumeet Vij (Software AG), Tom Rutt (Fujitsu, Ltd.), Vikas Varma (Software AG), Wu Chou (Avaya Communications), Yves Lafon (W3C/ERCIM).

13 References

13.1 Normative References

RFC 2119
Key words for use in RFCs to Indicate Requirement Levels , S. Bradner, Author. Internet Engineering Task Force, March 1997. Available at http://www.ietf.org/rfc/rfc2119.txt.
SOAP11
W3C Note, "Simple Object Access Protocol (SOAP) 1.1" , D. Box, et al, Editors. World Wide Web Consortium (W3C), 8 May 2000. Available at http://www.w3.org/TR/2000/NOTE-SOAP-20000508/.
SOAP12
W3C Recommendation, "SOAP Version 1.2 Part 1: Messaging Framework" , M. Gudgin, M. Hadley, N. Mendelsohn, J-J. Moreau, H. Frystyk Nielson, Editors. World Wide Web Consortium (W3C), 27 April 2007. Available at http://www.w3.org/TR/soap12-part1/.
WS-Addressing
W3C Recommendation, "Web Services Addressing 1.0 (WS-Addressing)" , M. Gudgin, M. Hadley, T. Rogers, Editors. World Wide Web Consortium (W3C), 9 May 2006. Available at http://www.w3.org/TR/ws-addr-core.
WS-Enumeration
W3C Working Group Draft, "Web Services Enumeration (WS-Enumeration) 1.1" , D. Davis, et al., Editors. World Wide Web Consortium (W3C), 15 September 2009. Available at http://www.w3.org/TR/ws-enumeration.
WS-EventDescriptions
W3C Working Group Draft, "Web Services Event Descriptions (WS-EventDescriptions) 1.0" , D. Davis, et al., Editors. World Wide Web Consortium (W3C), 15 September 2009. Available at http://www.w3.org/TR/ws-event-description.
WS-Eventing
W3C Working Group Draft, "Web Services Eventing (WS-Eventing) 1.1" , D. Davis, et al., Editors. World Wide Web Consortium (W3C), 15 September 2009. Available at http://www.w3.org/TR/ws-eventing.
WS-Fragment
W3C Working Group Draft, "Web Services Fragment (WS-Fragment) 1.0" , D. Davis, et al., Editors. World Wide Web Consortium (W3C), 15 September 2009. Available at http://www.w3.org/TR/ws-fragment.
WS-MetadataExchange
W3C Working Group Draft, "Web Services Metadata Exchange (WS-MetadataExchange) 1.1" , D. Davis, et al., Editors. World Wide Web Consortium (W3C), 15 September 2009. Available at http://www.w3.org/TR/ws-metadata-exchange.
WS-SOAPAssertions
W3C Working Group Draft, "Web Services SOAP Assertions (WS-SOAPAssertions) 1.0" , D. Davis, et al., Editors. World Wide Web Consortium (W3C), 15 September 2009. Available at http://www.w3.org/TR/ws-soap-assertions.
WS-Transfer
W3C Working Group Draft, "Web Services Transfer (WS-Transfer) 1.1" , D. Davis, et al., Editors. World Wide Web Consortium (W3C), 15 September 2009. Available at http://www.w3.org/TR/ws-transfer.
WSDL11
W3C Note, "Web Services Description Language (WSDL) 1.1" , E. Christensen, et al., Editors. World Wide Web Consortium (W3C), 15 March 2001 Available at http://www.w3.org/TR/2001/NOTE-wsdl-20010315.
XMLSchema - Part 1
W3C Recommendation, "XML Schema Part 1: Structures (Second Edition)" , H. Thompson, et al., Editors. World Wide Web Consortium (W3C), 28 October 2004. Available at http://www.w3.org/TR/xmlschema-1/.
XMLSchema - Part 2
W3C Recommendation, "XML Schema Part 2: Datatypes (Second Edition)" , P. Biron, A. Malhotra, Editors. World Wide Web Consortium (W3C), 28 October 2004. Available at http://www.w3.org/TR/xmlschema-2/.

A XML Schema

A normative copy of the XML Schema [XMLSchema - Part 1], [XMLSchema - Part 2] description for this specification can be retrieved from the following address:

A non-normative copy of the XML schema is listed below for convenience.

<xs:schema 
  targetNamespace='http://www.w3.org/2002/ws/ra/test/scenario'
  xmlns:tns='http://www.w3.org/2002/ws/ra/test/scenario'
  xmlns:xs='http://www.w3.org/2001/XMLSchema'
  elementFormDefault='qualified'
  blockDefault='#all' >
 
  <xs:complexType name='emptyElementType'>
    <xs:sequence>
      <xs:any namespace='##other' minOccurs='0' maxOccurs='unbounded'/>
    </xs:sequence>
    <xs:anyAttribute namespace='##other' processContents='lax'/>
  </xs:complexType>

  <xs:element name='SOAP11' type='tns:emptyElementType'/>
  <xs:element name='SOAP12' type='tns:emptyElementType'/>

</xs:schema>

B Change Log

Data Author Description
2010/10/26 GP Initial revision
2010/10/27 GP Fleshed out Basic, Wrapped, and Expiration tests; added sequence diagrams. Added stubs for Renew and Non-Addressable Event Sink tests.
2010/10/28 GP Editorial fixes. Changed animal names in honor of the Irish light-bellied Brent Geese tracked by the WWT (http://www.wwt.org.uk/).
2010/10/30 GP Added 34Conformance34 sections to each test that describe any allowable failures. Added sequence diagrams to Renew Test, SubscriptionEnd Test, and Non-Addressable Event Sink Test.
2011/01/09 DD Add a history section to each animal so we can track medical history or just make notes about the animal. Really, we need an array and something with an attribute to test frag stuf
2011/01/14 NB Added initial Enum section
2011/02/02 DD Moved from edcopies dir to test dir
2011/02/02 DD Updated frag xpath to not need prefix namespace mapping
2011/02/04 DD Add the sce:Scenario header and the sce:EndTime element
2011/03/22 DD Updates from Nathan
2011/04/07 DD Update namespaces to CR version - http://www.w3.org/2011/03/...