WS-MTOMPolicy published

Let's welcome MTOM Serialization Policy Assertion, or WS-MTOMPolicy for friends and close relatives :)

As we know, WS-Policy provides a generic framework of tremendous expressive power. It is sometimes very useful for very specific domains to provide prescriptive guidance about how certain common features can be expressed in form of assertions. WS-SecurityPolicy and WS-RMPolicy are two examples of this pattern, they mandate how to express common requirements in their own domains (security and reliability) by defining an assertion syntax and assigning a clear semantic (ie: expected effects on the behavior of the services).

For the sake of simplicity, we can say that  WS-MTOMPolicy describes how your policy should look like if you want to advertise the fact that your web service supports MTOM.

The fragment below comes straight from the spec: the text highlighted in yellow represents what is introduced by WS-MTOMPolicy.

<?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions  targetNamespace="example.com"

                   xmlns:tns="example.com"

                   xmlns:wsdl="https://schemas.xmlsoap.org/wsdl/"

                   xmlns:wsp="https://schemas.xmlsoap.org/ws/2004/09/policy"

                   xmlns:wsoma="https://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"

                   xmlns:wsu="https://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" >

  <wsp:Policy wsu:Id="MyPolicy" >

    <wsoma:OptimizedMimeSerialization />

    <!-- omitted assertions -->

  </wsp:Policy>

  <!-- omitted elements -->

  <wsdl:binding name="MyBinding" type="tns:MyPortType" >

    <wsp:PolicyReference  URI="#MyPolicy" wsdl:required="true" />

    <!-- omitted elements -->

  </wsdl:binding>

</wsdl:definitions>