MRM Custom wire format: Message model integrity
When you save a message definition file, the definitions that it contains are checked to ensure that they make sense and provide sufficient information about the message. This action is called model validation.
The CWF physical format depends on fixed-format data structures. Therefore, most tests that are applied to a CWF message confirm that each fragment of a message - and therefore, the message as a whole - has a well-defined length. Therefore, these tests examine properties such as Length, Length Reference and Length Units.
Typically, one or other of Length and Length Reference must be set. If Length Reference is set, it must refer to an element that is of simple type integer and that appears earlier in the message than the current item.
Tests other than these tend to be both simple and obvious so that, for example, the message set property First Day of Week must be the name of a day in the week.
The fact that CWF relies on fixed-format data structures also imposes some limitations on the messages that can be represented:
- CWF cannot represent a message that includes the use of XML Schema wild cards; this is a consequence of its inability to handle undefined content.
- CWF cannot represent a message that includes recursive definitions.
- CWF cannot represent a message that includes the use of substitution groups, because there is no way to recognize the substituted element.