WS-MTOM Policy

At long last, the tiny but valuable WS-MTOM Policy assertion spec has been acknowledged as a W3C Submission.  90% of the spec is boilerplate, so rather than wade through that, here’s a summary:

The spec defines the following element as a WS-Policy assertion:

<OptimizedMimeSerialization xmlns="http://schemas.xmlsoap.org/ws/2004/09/policy/optimizedmimeserialization"/>

When this policy assertion is used, all messages to and from a Web Service MUST be MTOM encoded; thus they will all have the application/xop+xml mime type.  The assertion can be used on, and thus applies uniformly to, a wsdl:binding or wsdl:port.  Although the spec doesn’t mention WSDL 2.0, there is an obvious implication that it will work just fine on a wsdl2:binding, or a wsdl2:endpoint.  That’s the spec in a nutshell.

This spec is bare-bones and thus avoids a number of nasty issues.  A few things the spec doesn’t define:

  • It does not constrain which parts of a message, if any, should or must be optimized.  Most messages sent and received from an endpoint will have the application/xop+xml mime type even though they only have a single message part (and thus no optimization).
  • It does not provide for operation-level granularity of describing MTOM encoding.  That is, all operations in the interface have to be optimized, or not.
  • It does not provide for message-level granularity of describing MTOM encoding.  That is, you should not expect to be able to send XOP and get back plain old SOAP, or vice versa.
  • wsp:Optional="true" is allowed on the assertion, so that you can still interoperate with the service without MTOM engaged.  However, this doesn’t mean you can mix and match MTOM and plain old SOAP at will.  Specifically, if you send a regular SOAP message to such an endpoint, it can infer that you have chosen the policy alternative that doesn’t include MTOM engagement, and so you won’t get an optimized message in response.  I have a feeling wsp:Optional will be an interop problem in practice, and don’t expect Microsoft to be emitting it in their WSDLs.

P.S. you might chuckle to note me as the editor - 3 months after leaving Microsoft.  And it was on my project list for, maybe, a year?  So you can see I wasn’t the only bottleneck ;-).

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Spam Protection by WP-SpamFree Plugin