Examples of Transport Requirements for Addressing Responses

 

These examples are taken from the email from David Hull: http://lists.w3.org/Archives/Public/public-ws-addressing/2007May/0002.html

 

I changed the examples to a server policy intersecting with a client policy.

 

Assume for all these examples that:

  - Alternative G is in place WS-Addressing metatdata

  - Assume only NonanonymousResponses are allowed.

  - Assume there are three assertion types defined in a fictitious namespace “wstr:”

      o http   - HTTP must be used for responses

      o jabber – Jabber must be used for responses

      o mailto – smtp must be used for responses.

 

1) Example 1 – restrictions on transport for non Anon response

 

A given response sender (i.e. server) understands WS-Addressing and can handle sending responses to non-anonymous response endpoints.  Furthermore, said endpoints must have either HTTP or Jabber destinations.  <call this Server Policy A>

 

A given response receiver (i.e. client), understands WS-Addressing and can receive non-anonymous responses which must have either Jabber or Mailto destinations. <call this Client Policy B>

 

Combining the information from these sources, we conclude that said non-anonymous responses between server A and client B must have Jabber destinations.  <call this Policy AIntersectB>

 

How do we express all this in WSP?  In particular, can we use policy intersection to combine the information from the two sources and get the expected result.?

 

Server Policy A:

 

<wsp:Policy>

    <wsp:ExactlyOne>

        <wsp:All> <--requires addr and nonAnon http responses-->

            <wsam:Addressing> <--requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:http/> <-- requires response in http request-->

        </wsp:All>

        <wsp:All> <--requires addr and nonAnon jabber responses-->

            <wsam:Addressing> <-  requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:jabber/> <-- requires response in jabber request-->

        </wsp:All>

    </wsp:ExactlyOne>

</wsp:Policy>

 

Client Policy B:

 

<wsp:Policy>

    <wsp:ExactlyOne>

        <wsp:All> <--requires addr and nonAnon mail responses-->

            <wsam:Addressing> <--requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:mailto/> <-- requires response in mail request-->

        </wsp:All>

        <wsp:All> <--requires addr and nonAnon jabber responses-->

            <wsam:Addressing> <-  requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:jabber/> <-- requires response in jabber request-->

        </wsp:All>

    </wsp:ExactlyOne>

</wsp:Policy>

 

Server Policy A intersect Client Policy B

<wsp:Policy>

    <wsp:ExactlyOne>

        <wsp:All> <--requires addr and nonAnon jabber responses-->

            <wsam:Addressing> <-  requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:jabber/> <-- requires response in jabber request-->

        </wsp:All>

    </wsp:ExactlyOne>

</wsp:Policy>

 

Indeed the intersection gives the correct result, only Jabber can be used for responses.

 

2) Example with optional transports for non Anon responses

Variant:  Instead of "must have" the sources tell us that the EPRs "may have" the given kind of destination.  The combined information is thus that the destinations may be HTTP, Jabber or mailto.

 

Server Policy C: - Optionally requires http or jabber non anonymous responses

 

In this example we have three alternatives, one “must use addressing non anon with http” another” must use addressing non anon with jabber” and “can try to use other non anon uri types”.   Remember, the NonAnonymous policy on its own does not guarantee availability of all non anon uri types.

 

<wsp:Policy>

    <wsp:ExactlyOne>

        <wsp:All> <--requires addr and nonAnon http responses-->

            <wsam:Addressing> <--requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:http/> <-- requires response in http request-->

        </wsp:All>

        <wsp:All> <--requires addr and nonAnon jabber responses-->

            <wsam:Addressing> <-  requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:jabber/> <-- requires response in jabber request-->

        </wsp:All>

        <wsp:All> <--requires addr and arbitrary nonAnon responses-->

            <wsam:Addressing> <--requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

        </wsp:All>

    </wsp:ExactlyOne>

</wsp:Policy>

 

Client Policy D: Optionally requires mail or jabber non anonymous responses

 

In this example we have three alternatives, one “must use addressing non anon with mail” another” must use addressing non anon with jabber” and “can try to use other non anon uri types”. :

 

<wsp:Policy>

    <wsp:ExactlyOne>

        <wsp:All> <--requires addr and nonAnon mail responses-->

            <wsam:Addressing> <--requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:mailto/> <-- requires response in mail request-->

        </wsp:All>

        <wsp:All> <--requires addr and nonAnon jabber responses-->

            <wsam:Addressing> <-  requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:jabber/> <-- requires response in jabber request-->

        </wsp:All>

        <wsp:All> <--requires addr and arbitrary nonAnon responses-->

            <wsam:Addressing> <--requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

        </wsp:All>

    </wsp:ExactlyOne>

</wsp:Policy>

 

Server Policy C intersect with Client Policy D

 

<wsp:Policy>

    <wsp:ExactlyOne>

        <wsp:All> <--requires addr and nonAnon jabber responses-->

            <wsam:Addressing> <-  requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

            <wstr:jabber/> <-- requires response in jabber request-->

        </wsp:All>

        <wsp:All> <--requires addr and arbitrary nonAnon responses-->

            <wsam:Addressing> <--requires nonAnonymous responses -->

                <wsp:Policy>

                    <wsp:ExactlyOne>

                        <wsp:All>

                            <NonAnonymousResponses />

                        </wsp:All>

                    </wsp:ExactlyOne>

                </wsp:Policy>

            </wsam:Addressing>

        </wsp:All>

    </wsp:ExactlyOne>

</wsp:Policy>

 

Which indicates that Jabber responses may be used, but other non anon uri’s can also be used.  (i.e., client may try to use any non anon response epr, however Jabber uris will work).

 

3) Examples with “must not use specific transports”

 

As Anish pointed out there is no “NOT” operator for WS-Addressing.

 

The following variants depend on the outcome of the discussions in the WS-policy group about absence = negation for top level policies.

 

Further variants: It seems reasonable for sources of information to be able to say things like "must not have ...", or for one source to say "must have HTTP or Jabber" and another to say "must not have jabber".