Someone at work asked me recently if it was possible to carry arbitrary binary attachments alongside XML data in a webservice (in his case, he wanted to pass around some images alongside their metadata). Now, I know it is possible, that's not an issue... the issue is: which way is better?

Now, I know that the "Flavor of the Month" regarding binary attachments in webservice calls is MTOM, but there's no implementation yet (at least not that I know of), and waiting for one would likely not be an option. So, I guess we'd be stuck for now with one of two choices:

  • Base64-encoding the binary image inside an element in the XML payload, or...
  • Using DIME, possibly as implemented by WSE

So.... what would you guys recommend?


Tomas Restrepo

Software developer located in Colombia.