MIME parser and domain

The MIME parser does not support the full MIME standard but does support common uses of MIME, including SOAP with Attachments (SwA). The messages can be sent to the broker over HTTP or over other transport types such as WebSphere MQ. Use the MIME domain if your messages use the MIME standard for multipart messages.

The multipurpose internet mail extensions (MIME) domain does not support Content-Type values with a media type of message.

To specify that a message uses the MIME domain use one of the following methods:

The MIME domain and parser allow you to parse and write MIME messages. The MIME parser creates a logical tree and sets up the broker ContentType property. You can use Compute nodes, Java Compute nodes, and Mapping nodes to manipulate the logical tree. Set the Content-Type value using the ContentType property in the MIME domain.

Example MIME message

The example below shows a simple multipart MIME message. The message shown is a SOAP with attachments message with two parts, the root part and one attachment part. The boundary string MIME_boundary delimits the parts.

MIME-Version: 1.0
Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml
Content-Description: Optional description of message.

Optional preamble text
--MIME_boundary
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <rootpart@example.com>

<?xml version='1.0' ?>
<SOAP-ENV:Envelope
          xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    
    <SOAP-ENV:Header xmlns:ins="http://myInsurers.com">
       <ins:ClaimReference>abc-123</ins:ClaimReference>
    </SOAP-ENV:Header>
    
    <SOAP-ENV:Body xmlns:ins="http://myInsurers.com">
       <ins:SendClaim>
          <ins:ClaimDetail>myClaimDetails</ins:ClaimDetail>
          <ins:ClaimPhoto>
            <href>cid:claimphoto@example.com</href>
          </ins:ClaimPhoto>
       </ins:SendClaim>
    </SOAP-ENV:Body>
    
</SOAP-ENV:Envelope>

--MIME_boundary
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <claimphoto@example.com>

myBinaryData
--MIME_boundary--
Optional epilogue text

Example MIME logical tree

The diagram below is an example of a MIME logical tree. A MIME logical tree does not need to contain all of the children shown here. The value of the Content-Type header of a MIME message is the same as the ContentType field in the Properties subtree. The Transport-headers are headers from the transport used, such as an MQMD.

The diagram shows an example MIME logical message tree. The Root element has three children. These are Properties, Transport headers and MIME. The Properties subtree contains the message domain, and the ContentType property. The Transport headers child contains information such as the MQMD header. The MIME subtree has 4 children. These are the MIME-Version header, the Content-Type header, the Content-Description header and the Parts child. The Parts child can have multiple children called Part and it can also optionally have preamble and epilogue children. The Part child shown here has a Content-Type header, a Content-Transfer-Encoding header and a Content-ID header. The last child of Part is Data. Here, Data consists of a BLOB.

You can parse the BLOB data in the tree further if you know about the format of that MIME part. You might be able to find information about the format from its Content-Type field in the logical tree. Alternatively, you might know the format that your MIME messages take and be able to parse them appropriately. For example, you might know that the first MIME Part is always an XML message and that the second MIME Part is a binary security signature.

You must specify how to parse other message formats, such as tagged delimited or binary data, within your message flow, because the MIME parser does not do this. You must also specify how to handle encoded and signed message parts, because the MIME parser does not process these.

Related concepts
MIME tree details
MIME messages
ESQL overview
Logical tree structure
Message modeling concepts
Related tasks
Designing a message flow
Developing ESQL
Developing Java
Manipulating message body content
Related reference
Developing flows using the MIME domain
Message model reference information