Supplementary Assertions and Tests for SOAP 1.2

This is a temporary stopgap only!
Date: 2002-12-23
cunnings@whitemesa.com

These are intended to allow testing of the "relay" attribute information item defined in SOAP 1.2 REC and supplement the tests found in the SOAP 1.2 Assertions and Test Collection.

Assertions

Assertion S1

Location of the assertion

SOAP 1.2 Part 1 Section 2.7.1

Text from the specification

A SOAP header block MAY carry a relay attribute information item (see 5.2.4 SOAP relay Attribute). When the value of such an attribute information item is "true", the header block is said to be relayable. The forwarding of relayable header blocks is described in section 2.7.2 SOAP Forwarding Intermediaries.

Tests

All of the tests defined below test this assertion.

Assertion S2

Location of the assertion

SOAP 1.2 Part 1 Section 2.7.1

Text from the specification

The relay attribute information item has no effect on SOAP header blocks targeted at a role other than one assumed by a SOAP intermediary.

Tests

ST4

Assertion S3

Location of the assertion

SOAP 1.2 Part 1 Section 2.7.1

Text from the specification

The relay attribute information item has no effect on the SOAP processing model when the header block also carries a mustUnderstand attribute information item with a value of "true".

Tests

ST5

Assertion S4

Location of the assertion

SOAP 1.2 Part 1 Section 2.7.1

Text from the specification

The relay attribute information item has no effect on the processing of SOAP messages by the SOAP ultimate receiver.

Tests

ST1  ST2  ST4

Assertion S5

Location of the assertion

SOAP 1.2 Part 1 Section 5.2.4

Text from the specification

The relay attribute information item has the following XML infoset properties:

  • A [local name] of relay.
  • A [namespace name] of "http://www.w3.org/2003/05/soap-envelope".
  • A [specified] property with a value of "true".

The type of the relay attribute information item is xs:boolean.

Tests

All of the tests defined below test this assertion.

Assertion S6

Location of the assertion

SOAP 1.2 Part 1 Section 5.2.4

Text from the specification

Omitting this attribute information item is defined as being semantically equivalent to including it with a value of "false".

Comments

Not tested here, covered in the SOAP 1.2 Assertions and Test Collection.

Assertion S7

Location of the assertion

SOAP 1.2 Part 1 Section 5.2.4

Text from the specification

SOAP senders SHOULD NOT generate, but SOAP receivers MUST accept the SOAP relay attribute information item with a value of "false" or "0".

Tests

ST3

Assertion S8

Location of the assertion

SOAP 1.2 Part 1 Section 5.2.4

Text from the specification

A SOAP receiver MUST accept any valid lexical representation of the attribute value.

Tests

ST1  ST2

Assertion S9

Location of the assertion

SOAP 1.2 Part 1 Section 5.2.4

Text from the specification

A SOAP receiver MUST ignore this attribute information item if it appears on descendants of a SOAP header block or on a SOAP body child element information item (or its descendents).

Tests

ST7

Header blocks used for testing

These header blocks are in the namespace "http://example.org/ts-tests".

echoOkUltimateReceiver

This header block is stipulated to be understood only by a SOAP node acting as the ultimate receiver in the message path. The semantics of processing this header block require the node to reply to the SOAP node from which it received the SOAP message containing this header. The response SOAP message must contain the header block responseOkUltimateReceiver containing the same information set as that in the echoOkUltimateReceiver header block. The type of this header block is string in the namespace "http://www.w3.org/2001/XMLSchema".

responseOkUltimateReceiver

This header block is generated as a result of processing the echoOkUltimateReceiver header block described above. The type of this header block is string in the namespace "http://www.w3.org/2001/XMLSchema".

DataHolder

This header block is defined in the SOAP 1.2 Assertions and Test Collection Section 3.2.5.

Test Definitions

Test ST1

Description:

Node A sends to Node B a message with a echoOkUltimateReceiver header block having role "http://www.w3.org/2002/06/soap-envelope/role/next" and relay="true". Node B forwards message to Node C with header included.

Messages:

Message sent from Node A

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:echoOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
            env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
            env:relay="true">
                This is a test!
            </h:echoOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node B

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:echoOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
            env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
            env:relay="true">
                This is a test!
            </h:echoOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node C

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:responseOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
                This is a test!
            </h:responseOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Test ST2

Description:

Node A sends to Node B a message with a echoOkUltimateReceiver header block having role "http://www.w3.org/2002/06/soap-envelope/role/next" and relay="1". Node B forwards message to Node C with header included.

Messages:

Message sent from Node A

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:echoOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
            env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
            env:relay="1">
                This is a test!
            </h:echoOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node B

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:echoOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
            env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
            env:relay="1">
                This is a test!
            </h:echoOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node C

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:responseOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
                This is a test!
            </h:responseOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Test ST3

Description:

Node A sends to Node B a message with a echoOkUltimateReceiver header block having role "http://www.w3.org/2002/06/soap-envelope/role/next" and relay="false". Node B forwards message to Node C with no header (header is removed).

Messages:

Message sent from Node A

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:echoOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
            env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
            env:relay="false">
                This is a test!
            </h:echoOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node B

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Body />
    </env:Envelope>

Message sent from Node C

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Body />
    </env:Envelope>

Test ST4

Description:

Node A sends to Node B a message with a echoOkUltimateReceiver header block having role "" and relay="false". Node B forwards message to Node C with header included anyway, since the relay attribute has no effect on a header block not targeted at the intermediary.

Messages:

Message sent from Node A

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:echoOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
            env:role="" env:relay="false">
                This is a test!
            </h:echoOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node B

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:echoOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
            env:role="" env:relay="false">
                This is a test!
            </h:echoOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node C

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:responseOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
                This is a test!
            </h:responseOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Test ST5

Description:

Node A sends to Node B a message with a echoOkUltimateReceiver header block having role "http://www.w3.org/2002/06/soap-envelope/role/next", relay="true", and mustUnderstand="true". Node B sends MustUnderstand fault back, as the relay attribute has no effect when mustUnderstand is true on the same header block.

Messages:

Message sent from Node A

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:echoOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
            env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
            env:relay="true" env:mustUnderstand="true">
                This is a test!
            </h:echoOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node B

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <env:NotUnderstood qname="ns:echoOkUltimateReceiver" xmlns:ns="http://example.org/ts-tests" />
        </env:Header>
        <env:Body>
            <env:Fault>
                <env:Code>
                    <env:Value>env:MustUnderstand</env:Value>
                </env:Code>
                <env:Reason>
                    <env:Text xml:lang="en">Mandatory header block not understood.</env:Text>
                </env:Reason>
                <env:Node>http://example.org/soap12/test-intermediary</env:Node>
            </env:Fault>
        </env:Body>
    </env:Envelope>

Message sent from Node C

Test ST6

Description:

Node A sends to Node B a message with a echoOkUltimateReceiver header block having role "http://www.w3.org/2002/06/soap-envelope/role/next" and relay="wrong". Node B sends a fault back, as the type of the relay attribute is "boolean".

Messages:

Message sent from Node A

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:echoOkUltimateReceiver xmlns:h="http://example.org/ts-tests"
            env:role="http://www.w3.org/2003/05/soap-envelope/role/next"
            env:relay="wrong">
                This is a test!
            </h:echoOkUltimateReceiver>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node B

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Body>
            <env:Fault>
                <env:Code>
                    <env:Value>env:Sender</env:Value>
                </env:Code>
                <env:Reason>
                    <env:Text xml:lang="en">Encountered invalid value for attribute 'relay' on header block.</env:Text>
                </env:Reason>
                <env:Node>http://example.org/soap12/test-intermediary</env:Node>
            </env:Fault>
        </env:Body>
    </env:Envelope>

Message sent from Node C

Test ST7

Description:

Node A sends to Node B a message with a DataHolder header block having role "http://www.w3.org/2002/06/soap-envelope/role/next" and a child element with attribute relay="true". Node B ignores the presence of relay on the header block child element, and drops the header block when forwarding the message.

Messages:

Message sent from Node A

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Header>
            <h:DataHolder xmlns:h="http://example.org/ts-tests"
            env:role="http://www.w3.org/2003/05/soap-envelope/role/next">
                <h:Data env:relay="true">This is a test!</h:Data>
            </h:DataHolder>
        </env:Header>
        <env:Body />
    </env:Envelope>

Message sent from Node B

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Body />
    </env:Envelope>

Message sent from Node C

    <?xml version='1.0' ?>
    <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
        <env:Body />
    </env:Envelope>