I was originally pretty worried that MTOM includes some weird formatting of the HTTP header, which I wouldn't have access to using the rails framework, but except for the content-type (which one can get access to through the @headers instance variable in the ActionController class), the HTTP header is essentially the same. FYI - for setting a unique HTTP content type in rails, check out this article. That means that the transformation occurs on the HTTP body only.
Basically, there are four things to set/read in a SOAP message to indicate that MTOM has been used:
- The application/xop+xml media is present
- The media type of the HTTP message is multipart/related.
- The media type of the root part of the MIME Multipart/Related package is application/xop+xml.
- The start-info parameter indicates a content type of application/soap+xml.
One more thing I'm noticing is that there aren't any MTOM test tools or validators out there. That is going to make testing any implementation I do in ruby pretty difficult (unless I want to set up a Java endpoint myself!) If anyone out there is interested in coding a basic Java/.NET MTOM endpoint, shoot me an email: mjreich at gmail dot com.