Microsoft Contribution to SOAP Version 1.2 Test Collection
Abstract
This document contains list of testable assertions for the SOAP 1.2 part1 and part2 specifications and list of tests. All assertions/tests are numbered as
(Part number).(Section number).(assertion/test number) . Each assertion contains references to the related tests.
Please refer to the latest SOAP Version 1.2 Working Drafts
(part 1 and part 2) for any
normative information. We plan to update the tests as the corresponding Working Drafts progress.
All the tests employ HTTP as a transport, using the HTTP binding described in the adjuncts specification.
Copyright 2002 Microsoft Corporation. All rights reserved.
Part 1
Section 1.2
Assertions
Assertion 1.1.1
Reference:
Part 1 Section 2.1 SOAP Nodes
Description:
A SOAP node receiving a SOAP message MUST perform processing according to the SOAP processing model
as described in this section and, if appropriate, generate SOAP faults, SOAP responses and send additional
SOAP messages, as provided by the remainder of this specification.
Tests:
All tests in this section .
Assertion 1.1.2
Reference:
Part 1 Section 2.2: SOAP Actors and Nodes
Description:
Each SOAP node MUST act in the role of the
special SOAP actor named "http://www.w3.org/2001/09/soap-envelope/actor/next",
and can additionally assume the roles of zero or more other SOAP actors.
Tests:
ultimate-actor-next, T1.2.18 .
Assertion 1.1.3
Reference:
Part 1 Section 2.2: SOAP Actors and Nodes
Description:
A SOAP node can establish itself as the ultimate SOAP receiver
by acting in the (additional) role of the anonymous SOAP actor.
Tests:
T1.2.3, T1.2.4, T1.2.8 - T1.2.13 .
Assertion 1.1.4
Reference:
Part 1 Section 2.2: SOAP Actors and Nodes
Description:
The roles assumed MUST be invariant during the processing of an individual SOAP message.
Tests:
T1.2.23 .
Assertion 1.1.5
Reference:
Part 1 Section 2.2: SOAP Actors and Nodes
Description:
SOAP nodes MUST NOT act in the role of the special SOAP actor
named "http://www.w3.org/2001/12/soap-envelope/actor/none".
Tests:
actor-none-1, actor-none-2, T1.2.8 .
Assertion 1.1.6
Reference:
Part 1 Section 2.2: SOAP Actors and Nodes
Description:
While the purpose of a SOAP actor name is to identify a SOAP node,
there are no routing or message exchange semantics associated with the SOAP actor name.
Tests:
actor-none-1, actor-none-2, T1.2.8 .
Assertion 1.1.7
Reference:
Part 1 Section 2.3 Targeting SOAP Header Blocks
Description:
SOAP header blocks carry optional actor attribute information items
(see 4.1.2.2 SOAP actor Attribute) that are used to target them to the appropriate SOAP node(s).
SOAP header blocks with no such attribute information item are implicitly targeted at the
anonymous SOAP actor, implying that they are to be processed by the ultimate SOAP receiver.
This specification refers to the (implicit or explicit) value of the SOAP actor attribute as the
SOAP actor for the corresponding SOAP header block.
Tests:
T1.2.6 - T1.2.10, T1.2.16 .
Assertion 1.1.8
Reference:
Part 1 Section 2.3 Targeting SOAP Header Blocks
Description:
A SOAP Node that acts in the role of the anonymous actor with respect to a
particular SOAP message becomes the ultimate recipient of that SOAP message.
Such a SOAP node is responsible for processing all parts of the message intended for
the anonymous actor, including the body, according to the rules described in this section.
Tests:
T1.2.3 , T1.2.4 .
Assertion 1.1.9
Reference:
Part 1 Section 2.4 Understanding SOAP Headers
Description:
For every mandatory SOAP header block targeted to a node,
that node MUST either process the block according to the semantics
conveyed by the combination of local name and namespace name of the
outer-most element information item of that block; or not process the
SOAP message at all, and instead generate a fault
Tests:
T1.2.11 - T1.2.15 .
Assertion 1.1.10
Reference:
Part 1 Section 2.4 Understanding SOAP Headers
Description:
Mandatory blocks MUST be presumed to somehow modify the semantics of other headers
or body elements.
Tests:
T1.2.24 .
Assertion 1.1.11
Reference:
Part 1 Section 2.5 Structure and Interpretation of SOAP Bodies
Description:
A SOAP body consists of zero or more namespace qualified element
information items, which are the immediate children of the Body element information item.
Tests:
T1.2.22 .
Assertion 1.1.12
Reference:
Part 1 Section 2.6 Processing SOAP Messages
Description:
Unless otherwise stated, processing must be semantically equivalent to performing
the following steps separately, and in the order given.
Tests:
T1.2.12, T1.2.16, T1.2.17, T1.2.24, T1.2.25 .
Assertion 1.1.13
Reference:
Part 1 Section 2.6 Processing SOAP Messages
Description:
If one or more of the header blocks identified in the preceding step
are not understood by the node then generate a single SOAP MustUnderstand
fault (see 4.4.6 MustUnderstand Faults).
Tests:
T1.2.12, T1.2.25 .
Assertion 1.1.14
Reference:
Part 1 Section 2.6 Processing SOAP Messages
Description:
If such a fault[SOAP MustUnderstand fault] is generated, any further processing MUST NOT be done.
Faults relating to the existence or contents of the body MUST NOT be generated in this step.
Tests:
T1.2.23, T1.2.25 .
Assertion 1.1.15
Reference:
Part 1 Section 2.6 Processing SOAP Messages
Description:
The ultimate recipient MUST process the SOAP body, in a manner
consistent with 2.5 Structure and Interpretation of SOAP Bodies.
Tests:
T1.2.24 .
Assertion 1.1.16
Reference:
Part 1 Section 2.6 Processing SOAP Messages
Description:
If processing is unsuccessful, exactly one fault MUST be generated by the node.
Tests:
T1.2.25 .
Assertion 1.1.17
Reference:
Part 1 Section 2.6 Processing SOAP Messages
Description:
Such relayed SOAP messages MUST contain all SOAP header blocks and
the SOAP body from the original SOAP message, in the original order,
except that SOAP header blocks targeted at the SOAP intermediary
MUST be removed (such SOAP blocks are removed regardless of whether
they were processed or ignored).
Tests:
T1.2.8 .
Tests
The following tests use the 3 SOAP nodes.
- NodeA is the test client.
- Node C play the role of ultimate
destination and additionally assumes the actor URI "http://example.org/ts-tests/C"
- Node B plays a role of intermediary and assumes the following actor URI: http://example.org/ts-tests/B1
NodeA, NodeB and NodeC implement some mechanizm for routing so that the following messaging scenarios are allowed:
- NodeA sends message to NodeC, NodeC returns response or fault message back to NodeA.
- NodeA sends message to NodeB, NodeB forwards message to NodeC or returns Fault back to NodeA,
NodeC either:
- returns Fault message to NodeB, NodeB forwards fault message to NodeA
- returns response message to NodeB, NodeB forwards response to NodeA.
Example of the framework that would allow such
messaging scenarios is WS-Routing.
NodeC message processing:
NodeB message processing:
- If incoming message contains test:echoOk header block targeted at NodeB, NodeB removes the header block and forwards message appropriately (to NodeC).
Test:ultimate-actor-next
Description:
Node A sends to node C message with echoOk header block having actor role equal to "http://www.w3.org/2001/12/soap-envelope/actor/next".
Node C returns back empty body with responseOK header.
Messages:
Message sent from Node A
foo
Message sent from Node C
foo
Test:ultimate-actor
Description:
Node A sends to node C message with echoOk header block having actor role equal to "http://example.org/ts-tests/C".
NodeC returns back empty body with responseOK header.
Messages:
Message sent from Node A
foo
Message sent from Node C
foo
Test:T1.2.3
Description:
Node A sends to node C message with echoOk header block having no actor role.
NodeC returns back empty body with responseOK header.
Messages:
Message sent from Node A
foo
Message sent from Node C
foo
Test:T1.2.4
Description:
Node A sends to node C message with echoOk header block having actor="". NodeC sends message back with responseOK header.
Messages:
Message sent from Node A
foo
Message sent from Node C
foo
Test:T1.2.5
Description:
Node A sends to node C message with echoOk header block having actor="http://example.org/ts-tests/B".
Node C sends response message with responseOK back with no header or empty env:Header element (header block was ignored).
Messages:
Message sent from Node A
foo
Message sent from Node C
Test:T1.2.6
Description:
Node A sends to node B message with echoOk header block having actor="http://example.org/ts-tests/C".
NodeB forwards message to NodeC without touching the header block.
Messages:
Message sent from Node A
foo
Message sent from Node B
foo
Message sent from Node C
foo
Test:T1.2.7
Description:
Node A sends to node B message with echoOk header block having actor="http://example.org/ts-tests/B".
NodeB forwards message to NodeC with no header (header was removed).
Messages:
Message sent from Node A
foo
Message sent from Node B
Message sent from Node C
Test:T1.2.8
Description:
Node A sends to node B message with 3 headers: echoOk header block having no actor role, echoOk header block having actor="http://example.org/ts-tests/B" and
echoOk header block having actor="http://www.w3.org/2001/12/soap-envelope/actor/none". NodeB removes the second header block,
that has actor="http://example.org/ts-tests/B" and forwards message to NodeC with 2 other headers included in the same order as in the original message.
Messages:
Message sent from Node A
foo
foo
foo
Message sent from Node B
foo
foo
Message sent from Node C
foo
Test:T1.2.9
Description:
Node A sends to node B message with echoOk header block having actor="" role. NodeB forwards message to NodeC with header included.
Messages:
Message sent from Node A
foo
Message sent from Node B
foo
Message sent from Node C
foo
Test:T1.2.10
Description:
Node A sends to node C message with Unknown header having actor="" role. NodeC sends empty message back with no headers- header is ignored.
Messages:
Message sent from Node A
foo
Message sent from Node C
Test:T1.2.11
Description:
Node A sends to node C message with Unknown header with mustUnderstand="false" and having actor="" role.
NodeC sends empty message back with no headers- header is ignored.
Messages:
Message sent from Node A
foo
Message sent from Node C
Test:T1.2.12
Description:
Node A sends to node C message with Unknown header with mustUnderstand="1" and having actor="" role. NodeC sends MustUnderstand fault back.
Messages:
Message sent from Node A
foo
Message sent from Node C
env:MustUnderstand
Header not understood
Test:T1.2.13
Description:
Node A sends to node C message with Unknown header with mustUnderstand="true" and having actor="" role. NodeC sends MustUnderstand fault back.
Messages:
Message sent from Node A
foo
Message sent from Node C
env:MustUnderstand
Header not understood
Test:T1.2.14
Description:
Node A sends to node C message with Unknown header with mustUnderstand="wrong" and having actor="" role. NodeC sends a fault back.
Messages:
Message sent from Node A
foo
Message sent from Node C
env:MustUnderstand
Header not understood
Test:T1.2.15
Description:
Node A sends to node C message with Unknown header with mustUnderstand="1" and having actor="http://example.org/ts-tests/B" role.
NodeC sends empty message back with no headers- header is ignored.
Messages:
Message sent from Node A
foo
Message sent from Node C
Test:T1.2.16
Description:
Node A sends to node C message with Unknown header with mustUnderstand="wrong" and having actor="http://example.org/ts-tests/B" role.
NodeC sends empty message back with no headers- header (even with invalid value for mustUnderstand) is ignored.
Messages:
Message sent from Node A
foo
Message sent from Node C
Test:T1.2.17
Description:
Node A sends to node B message with Unknown header with mustUnderstand="1" and having actor="http://example.org/ts-tests/C" role.
NodeB forwards message to node C keeping header untouched.
Messages:
Message sent from Node A
foo
Message sent from Node C
env:MustUnderstand
Header not understood
Test:T1.2.18
Description:
Node A sends to node B message with Unknown header with mustUnderstand="1" and having actor="http://www.w3.org/2001/12/soap-envelope/actor/next" role.
NodeB returns MustUnderstand fault to node A.
Messages:
Message sent from Node A
foo
Message sent from Node B
env:MustUnderstand
Header not understood
Test:actor-none-1
Description:
Node A sends to node B message with echoOk header having actor="http://www.w3.org/2001/12/soap-envelope/actor/none" role.
NodeB forwards message to the node C, node C responds back to node A with empty message (no body/header blocks).
Messages:
Message sent from Node A
foo
Message sent from Node B
foo
Message sent from Node C
Test:actor-none-2
Description:
Node A sends to node C message with echoOk header having mustUnderstand = "true" and actor="http://www.w3.org/2001/12/soap-envelope/actor/none" role.
Node C ignores this header block and returns empty message (no body/header blocks).
Messages:
Message sent from Node A
foo
Message sent from Node C
Test:T1.2.22
Description:
Node A sends to node C message with Body element that contains non-qualified children.
Not clear from the spec what should Node C return, our interpretation is Fault.
Messages:
Message sent from Node A
element
Message sent from Node C
env:Client
Message with illegal Body content
Test:T1.2.23
Description:
Node A sends to node B message with Unknown header that has mustUnderstand = "1" and actor="http://example.org/ts-tests/B" and
echoOk header that has actor="http://example.org/ts-tests/C" role and mustUnderstand="1". Node B has to return MustUnderstand Fault message to NodeA
and no message should be forwarded to NodeC.
Messages:
Message sent from Node A
foo
foo
Message sent from Node B
env:MustUnderstand
Header not understood
Test:T1.2.24
Description:
NodeA sends to NodeC message with echoOk header that has mustUnderstand="1" and echoOk Body element. NodeC should process the Header and the Body
and return to NodeA message with responseOk header and responseOk Body element.
Messages:
Message sent from Node A
foo
foo
Message sent from Node C
foo
foo
Test:T1.2.25
Description:
NodeA sends to NodeC message with echoOk header that has mustUnderstand="wrong" and Unknown header that has mustUnderstand="1".
NodeC should return exactly one MustUnderstand Fault.
Messages:
Message sent from Node A
foo
foo
Message sent from Node C
foo
foo
Section 1.3
Assertions
Assertion 1.2.1
Reference:
Part 1. Section 3. Relation to XML
Description:
A SOAP node MUST ensure that all element information items and
attribute information items in messages that it generates are correctly
namespace qualified.
Tests:
any SOAP validator, for example http://www.soaptoolkit.com .
Assertion 1.2.2
Reference:
Part 1. Section 3. Relation to XML
Description:
A SOAP node MUST be able to process SOAP namespace information in messages that
it receives.
Tests:
any test in this document .
Assertion 1.2.3
Reference:
Part 1. Section 3. Relation to XML
Description:
It[SOAP Node] MUST treat messages with incorrect namespace information as described in 4.1.2 Envelope Versioning Model.
Tests:
T1.3.1 .
Assertion 1.2.4
Reference:
Part 1. Section 3. Relation to XML
Description:
A SOAP message MUST NOT contain a Document Type Declaration.
Tests:
T1.3.2 .
Assertion 1.2.5
Reference:
Part 1. Section 3. Relation to XML
Description:
On receipt of a SOAP message containing a Document Type Declaration, a SOAP
receiver MUST generate a fault (see 4.4 SOAP
Fault) with a faultcode of "DTDNotSupported".
Tests:
T1.3.2 .
Assertion 1.2.6
Reference:
Part 1. Section 3. Relation to XML
Description:
A SOAP message SHOULD NOT contain processing instruction information items. A
SOAP receiver MUST ignore processing instruction information items in
SOAP messages it receives.
Tests:
T1.3.3 .
Assertion 1.2.7
Reference:
Part 1. Section 3. Relation to XML
Description:
A SOAP message MUST NOT impose any XML schema processing (assessment and
validation) requirement on the part of any receiving SOAP node. Therefore, SOAP
REQUIRES that all attribute information items, whether specified in
this specification or whether they belong to a foreign namespace be caried in
the serialized SOAP envelope.
Tests:
no tests yet .
Tests
The following tests use the 2 SOAP nodes.
- NodeA is the test client.
- Node C plays the role of ultimate destination.
NodeC processing model is similar to the one in section 2,
Test:T1.3.1
Description:
Node A sends to node C message with incorrect namespace of the Envelope element. Node C returns back VersionMismatch Fault.
Messages:
Message sent from Node A
foo
Message sent from Node C
env:VersionMismatch
Wrong Version
Test:T1.3.2
Description:
Node A sends to node C message with reference to external DTD. Node C returns back DTDNotSupported Fault.
Messages:
Message sent from Node A
foo
Message sent from Node C
env:DTDNotSupported
DTD are not supported by SOAP 1.2
Test:T1.3.3
Description:
Node A sends to node C message with Processing Instruction node. Node C ignores PI and returns back Body with test:responseOk element.
Messages:
Message sent from Node A
foo
Message sent from Node C
foo
Section 1.4
Assertions
Assertion 1.3.1
Reference:
Part 1. Section 4.1.1 SOAP encodingStyle Attribute
Description:
In addition, all URIs syntactically beginning with http://www.w3.org/2001/12/soap-encoding
indicate conformance with the SOAP encoding rules defined in SOAP
Encoding, though with potentially tighter rules added.
Tests:
T1.4.1 .
Assertion 1.3.2
Reference:
Part 1. Section 4.1.2 Envelope Versioning Model
Description:
If a SOAP message is received by a SOAP 1.2 node in which the document
element information item does NOT have a namespace name of
http://www.w3.org/2001/12/soap-envelope the SOAP node MUST treat this
as a version error and generate a VersionMismatch SOAP fault.
Tests:
T1.3.1 .
Assertion 1.3.3
Reference:
Part 1. Section 4.1.2 Envelope Versioning Model
Description:
Any other malformation of the message structure MUST be treated as a Sender SOAP
fault
Tests:
T1.2.14, T1.2.22 .
Assertion 1.3.4
Reference:
Part 1. Section 4.2.1 Use of Header Attributes
Description:
A SOAP receiver MUST ignore all SOAP header block attribute information
items that are applied to other descendant element information
items of the SOAP Header
element information
item.
Tests:
no tests .
Assertion 1.3.5
Reference:
Part 1. Section 4.3 SOAP Body
Description:
The Body
element information item has:
Tests:
T1.4.2, T1.2.8 .
Assertion 1.3.6
Reference:
Part 1. Section 4.4.4 SOAP detail Element
Description:
It[detail element] MUST be present when the contents of the SOAP Body could not be processed
successfully.
Tests:
no tests .
Assertion 1.3.7
Reference:
Part 1. Section 4.4.4 SOAP detail Element
Description:
It MUST NOT be used to carry error information about any SOAP header blocks.
Tests:
no tests .
Assertion 1.3.8
Reference:
Part 1. Section 4.4.4 SOAP detail Element
Description:
Detailed error information for SOAP header blocks MUST be carried within the
SOAP header blocks themselves.
Tests:
no tests .
Assertion 1.3.9
Reference:
Part 1. Section 4.4.4 SOAP detail Element
Description:
The absence of the detail
element information item
indicates that a SOAP Fault is not related to the processing of the
SOAP Body
Tests:
no tests .
Assertion 1.3.10
Reference:
Part 1. Section 4.4.4 SOAP detail Element
Description:
The detail
element information item has:
-
A local name of detail ;
-
A namespace name which is empty;
-
Zero or more attribute information items;
-
Zero or more child element information items.
Tests:
T1.4.3 .
Assertion 1.3.11
Reference:
Part 1. Section 4.4 SOAP Fault
Description:
If present, the SOAP Fault MUST appear as a direct child of the
SOAP body and MUST NOT appear more than once within a SOAP Body.
Tests:
no tests yet .
Assertion 1.3.12
Reference:
Part 1. Section 4.4 SOAP Fault
Description:
The Fault
element information item has:....A mandatory faultcode
element information item...
Tests:
no tests .
Assertion 1.3.13
Reference:
Part 1. Section 4.4 SOAP Fault
Description:
The Fault
element information item has:....A mandatory faultstring
element information item,...
Tests:
no tests .
Tests
The following tests use the 2 SOAP nodes.
- NodeA is the test client.
- Node C plays the role of ultimate destination.
NodeC processing model is similar to the one in section 2,
Test:T1.4.1
Description:
Node A sends to node C message with test:echoEncArray that has encodingStyle attibute that has a value "http://www.w3.org/2001/12/soap-encoding/strict/",
contains an element with attribute enc:arrayType="xs:int[3]" (array of integers), but with the child element of a complex type.
Node C returns a Fault indicating that message didn't follow SOAP encoding rules (encoded array content didn't correspond to the
type declared in the enc:arrayType).
Messages:
Message sent from Node A
Message sent from Node C
env:Sender
Violation of encoding rules
Array element declared as array of integers contains
elements with wrong content.
Test:T1.4.2
Description:
Node A sends to node C message with Body element that has encodingStyle attribute. Node C returns Fault message,
because Body element must not contain attributes.
Messages:
Message sent from Node A
foo
Message sent from Node C
env:Sender
Incorrect SOAP Body element serialization
SOAP Body must not have attribute information items children.
Test:T1.4.3
Description:
Node A sends to node C message with Body element that has encodingStyle attribute. Node C returns Fault message,
because Body element must not contain attributes, but erroneously puts text error information as a direct text child of detail element.
Node A reports an error (as an abstract Fault message) to the user.
Messages:
Message sent from Node A
foo
Message sent from Node C
env:Sender
Incorrect SOAP Body element serialization
SOAP Body must not have attribute information items children.