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.

A multipart message must contain a group or a complex type with its Composition property set to Message. This group or complex type Start of changecan containEnd of change a list of references to messages which Start of changeare allowed toEnd of change appear at that location in the message structureStart of change, or it may be empty , permitting any message to appearEnd of change. When a message is parsed, only one message can appear in that position as an embedded message.

Start of changeAn embedded message can be from the same message set as the multipart message, or it can be from a different message set altogether.End of change

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 above.

Identifying the embedded message

When a multipart message is parsed, the parser needs to be able to identify the embedded message (it could be any of the messages referenced by the group or complex type)Start of change, or it could be a message not referenced by the group or complex type, perhaps from a different message set). This is achieved using one of two techniques, Message Identity or Message Path.End of change.

Restrictions

When a multipart message is received or generated by a broker, all embedded messages must be of the same physical format as the outermost messageStart of change and have the same character set and encodingEnd of change.