WebSphere Message Brokers
File: ac30090_
Writer: Catherine Tucker

Concept topic

This build: July 31, 2007 21:19:57

MIME tree details

Logical tree elements

A MIME message is represented in the broker as a logical tree with the following elements:
  • The root of the tree is a node called MIME.
  • All correctly formatted headers are stored in the logical tree, regardless of whether they conform to the MIME standard. The headers appear in the logical tree as name=value, as shown here:
    Content-Type=text/xml
  • A multipart MIME message is represented by a subtree with a root node called Parts.
  • Any preamble or epilogue data associated with a multipart MIME message is represented by value-only elements appearing as the first and last children of Parts.
  • In the special case of single-part MIME, the content is represented by a subtree with the root called Data.
  • Each part of a multipart MIME message is represented by an element called Part with a child element for each MIME header, and a last child called Data.
  • The Data element represents the content of a MIME part. This makes it easier to test for the presence of body content using ESQL because the Data element is always the last child of its parent.

Writing MIME messages

When writing a message, the MIME parser creates a message bit stream using the logical message tree. The MIME domain does not enforce all of the constraints that the MIME specification requires, therefore it might generate MIME messages that do not conform to the MIME specification. The constraints that the MIME parser imposes are:
  • The tree must have a root called MIME, and constituent Parts, Part, and Data elements, as described in Logical tree elements.
  • Exactly one Content-Type header must be present at the top level of the tree, or be available via the ContentType property. Media subtypes are not validated.
  • If the media type is multipart then there must also be a valid boundary parameter.
  • Any constituent MIME parts may have exactly one Content-Type header. If the value of this header starts with multipart then it must also include a valid boundary parameter. The value of this boundary parameter must not be the same as other boundary parameter values in the definition.
  • The MIME Content-Type value "message" is not supported and results in an error at run time.
  • All name-value elements in the tree are written as name: value followed by the ASCII sequence <CR><LF>.
If you have other elements in the tree, the parser behaves in the same way as the HTTP header parser:
  • A name-only element or a NameValue element with a NULL value results in Name: NULL .
  • Any children of a name-value element are ignored.
The message flow must serialize subtrees if they exist. This can be done using the ESQL command ASBITSTREAM.
Related concepts
MIME parser and domain
MIME messages
Logical tree structure
Message modeling concepts
Related tasks
Manipulating message body content
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:19:57

ac30090_ This topic's URL is: