Message Sets: Multipart messages

A multipart message contains one or more other messages within its structure. The contained message is sometimes referred to as an embedded message.

Tip: Multipart messages are used when working with messages that are modeled by using message sets. A message set is the original container for message models used by IBM® Integration Bus. In WebSphere® Message Broker Version 8.0 and later, message model schema files contained in applications and libraries are the preferred way to model messages for most data formats. Message sets continue to be supported, and are required if you use the MRM or IDOC domains. If you need to model data formats for use in the MRM or IDOC domains, you must first enable message set development in the IBM Integration Toolkit. For more information, see Enabling message set development .

A multipart message must contain a group, or a complex type, with its Composition property set to Message. This group or complex type can contain a list of references to messages that can be present at that location in the message structure. If the group or complex type is empty, any message can be present. When a message is parsed, only one embedded message can be present in that location.

Message envelopes

A common use of multipart messages is to define an outer message with a fixed structure. This outer message is called the message envelope. Within the message envelope a group or complex type is included, as described earlier in this topic. Examples of message standards that can be modeled by using this technique are EDIFACT, X12, SWIFT, SOAP XML, SAP ALE IDoc, multipart MIME, and RosettaNet.

Identifying the embedded message

When a multipart message is parsed, the parser must be able to identify the embedded message; it might be any of the messages that are referenced by the group or complex type, or it might be a message that is not referenced by the group or complex type, perhaps from a different message set. This is achieved by using one of four techniques, Automatic, Message Identity, Message Path, or Manual.

Used when parsing XML messages, such as SOAP. The parser automatically identifies and parses embedded messages by using the tag in the XML document.
Message Identity
Used by the MRM parser. See Message Sets: Identifying an embedded message by using a Message Identity.
Message Path
Used by the MRM parser. See Message Sets: Identifying an embedded message by using a Message Path.
Used by the MIME parser. The parser treats embedded messages as BLOBs. If you want to parse the BLOB by using another parser, you must do so manually by using ESQL, or Java™, or a ResetContentDescriptor node.


Unless using the Manual identification technique, all embedded messages must be of the same physical format as the outermost message, and have the same character set and encoding.

When using the Automatic or Message Path identification techniques, all embedded messages must be from the same message set as the multipart message.