The WS-I AttachmentsProfile is a Sham
January 4th, 2007Before I really got to know the WS-I attachments profile I thought there were basically three ways to send attachments with SOAP: Soap w/ Attachments, DIME, and MTOM. I was wrong, there are four - the fourth being the WS-I Attachments Profile.
The goal of the profile is stated as:
This document defines the WS-I Attachments Profile 1.0, consisting of a set of non-proprietary Web services specifications, along with clarifications and amendments to those specifications that are intended to promote interoperability.
If this spec was really intended to promote interoperability it wouldn’t have defined a completely new way to do attachments. It introduces two new backward incompatible changes. First, it requires you to include the reference to the attachment in your schema via a new XML schema type called wsi:swaRef. Before you could simply reference an attachment in your mime binding without putting anything in your schema (example here).
Second it devised a completely new Content-ID format for referencing MIME parts. For example: <fooPart=somereallybignumberlikeauuid@example.com>. Notice how we have “fooPart=” in the Content-ID? This is required to tie the MIME attachment to the newly invented way to reference attachments in your schema. There is no such mention of a thing in the SOAP w/ Attachments specification.
I have come to the conclusion that there is absolutely no point in supporting the WS-I AttachmentsProfile. For it to be a profile (in my mind) it should standardize and categorize existing techniques, not invent new ones. I recommend that anyone using attachments just use MTOM which is a much better standard and more widely supported anyway.