XML wire format: Multipart messages

The XML Wire Format supports both the Message Identity technique and the Message Path technique of identifying embedded messages within a multipart message. It is not mandatory for them to be used in order to identify an embedded message, as the content and the structure of the message are both fully described by the bit stream. The logical model must include an embedded message definition at the appropriate position, but there are no extra definitions required.

In the MRM domain, embedded XML messages are recognized by matching their XML tag name against the XML name of a message definition in the message model. If the position of the embedded message corresponds to an embedded message definition in the logical model, the message is recognized.

So when either of Message Identity or Message Path techniques are used with XML messages, the Message Identity element value or the Message Path value is only used to check that the message identified by the XML tag in the bit stream is the one that is expected. If it is not the expected message then an exception is thrown.

Where you have defined the embedded message in a different message set, you need to use a Message Set Identity element or attribute value to specify the target message set.Note that the message sets within which the root and subsequent embedded messages are defined must be consistent in their use of the 'Use Namespace' property of the message set. That is, embedded messages that are defined in a namespace-aware message set and that are contained within a parent message that is defined in a message set that is not namespace-aware, are not supported. Similarly, embedded messages that are defined in a message set that is not namespace-aware and that are contained within a parent message that is defined in a namespace-aware message set, are not supported.

If the embedded message definition is a complex type, the message definition will contain a complex element based on that complex type. This complex element will have its own tag, which will appear in the bit stream before the tag for the embedded message. If you want to avoid this extra tag, you can create the embedded message definition from a group, and insert the group at the appropriate position in the message model.

Tip: Note that the root tag property of an embedded message is not applicable.