How does one relax after a rough day at the office, well you go for a swim, rough it with the kids and settle down to explore a protocol you had not noticed before. This is what I found.
So DIME is a protocol, it’s uniqueness is it’s joint design proposal by Microsoft and IBM to be able to send and receive SOAP messages along with attachments of almost any format, binary, XML fragments, even other SOAP messages.
DIME like SOAP still uses standard transport mechanisms such as HTTP and TCP. The protocol is designed to be faster for large messaging. (something like sending video files for example)
Lets have a look at the stack.

• Version : Represents the DIME version used to create the message.
• MB: message begin (MB) flag, marking the first record of the DIME message. Only one record in the message can contain the MB flag.
• ME : The message end (ME) flag, which is the last record in the DIME message. Only one record can contain the ME flag
• CF : Specifies that the records' contents have been chunked.
• Type_T (4 bits): the structure and format of the Type field
• Reserved (4 bits): reserved for future use
• Options_Length (16 bits): the length of the Options field in bytes
• ID_Length (16 bits): the length of the ID field in bytes
• Type_Length (16 bits): the length of the Type field in bytes
• Data_Length (32 bits): the length of the Data field in bytes
• Options: any additional data that the interpreter can use
• ID: a URI that uniquely identifies the record
• Type: the type of data in the record
• Data: the binary data
So how would a DIME message look:
Here is an example:
0001 1 0 0 0010 0000 0000000000000000
0000000000000000 0000000000101000
00000000000000000000000110000010
http://www.w3.org/2003/05/soap-envelope
<soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
xmlns="http://someuri.com/"
xmlns:ref="http://schemas.xmlsoap.org/ws/2002/04/reference/">
<soap:Body>
<workflow>
<addDocImage>
<image href="uuid:85FB8DEE-EFD8-4b6c-888B-AA31002F649F"/>
</addDocImage>
</workflow>
</soap:Body>
</soap:Envelope>
-------------------------------------------------------------------------------
----------------------
0001 0 1 0 0001 0000 0000000000000000
0000000000101001 0000000000001010
00000000000000001101011011110010
uuid: 85FB8DEE-EFD8-4b6c-888B-AA31002F649F
image/jpeg
[55,206 bytes of JPEG image data]
In order to use DIME you gonna need some tools, here are a few resources to help you:
(i.e., instead of writing your own generator and interpreter).
In the Microsoft realm: SOAP Toolkit 3.0
In .NET: Microsoft.Web.Services2.Dime Namespace
For PHP: PEAR::Net_DIME package
For Perl: DIME-Tools-0.03 package
OK this is a very high level mention of this protocol. For some cool in-depth reading check out:
http://msdn.microsoft.com/msdnmag/issues/02/12/DIME/
http://msdn.microsoft.com/library/en-us/dnglobspec/html/draft-nielsen-dime-02.txt
http://webservices.xml.com/pub/a/ws/2002/09/18/ends.html