IBM Integration Bus, Version 10.0.0.9 Operating Systems: AIX, HP-Itanium, Linux, Solaris, Windows, z/OS


Message Sets: Omission and truncation of elements

Omitting and truncating elements depends on the setting of the property Suppress Absent Element Delimiters.

See Message Sets: Complex type TDS properties, Message Sets: Global group TDS properties, or Message Sets: Local group TDS properties for a description of this property.

If you have created a message in which some elements are optional, an input message might not contain all defined elements. If the elements are in a complex type that you have defined with the Data Element Separation property of the type set to All Elements Delimited or Variable Length Elements Delimited (in which the elements are separated by a delimiter and have no tag), any elements that are missing from the end of the complex type must be indicated by the application that creates the message in one of two ways. These ways provide techniques to avoid long sequences of delimiters, and to preserve consistent representation of missing elements.

  1. If you have set the Delimiter property for the complex type to a value that does not match the value that you have set for the Delimiter property for any of the complex type's parent types, the elements at the end of the message can be indicated by the occurrence of a Delimiter of one of its parents after the last actual element in the complex type data.

    This is known as the truncation method, in which missing elements are treated as not expected, and both data and delimiters are omitted in the bit stream.

    For example, you define a complex element C that has four optional elements. You set the Delimiter property to the character plus (+). You define complex element P, and set the Delimiter property of P to asterisk (*). You add three elements to P, the first is a string, the second is complex element C, and the third is a string.

    When a particular instance of the message is received by the integration node, all the elements of P are present, but only the first two elements of C are present. The data in the message appears as follows if the truncation method is used (where Pn are the values of the elements of P and Cn the values of the elements of C):

    P1*C1+C2*P3

    When the parser encounters the second asterisk delimiter, it determines that the last two elements of complex element C are not present, and the next element is the third element of P.

    You can use truncation successfully only when both omission and truncation cause the parser to exhibit the same behavior, unless the elements truncated are fixed length.

  2. If the Delimiter of the complex type matches that of one of its parents, the truncation method cannot be used. This is because the parser cannot determine whether the delimiter after the last element is for the current complex type, or for one of its parents. Therefore a delimiter must be included in the message data for each missing element to ensure that the parser can match the elements with the model.

    This is known as the omission method, in which missing simple elements are represented by an empty sequence of characters between two delimiters.

    For example, you define P and C as in the previous example, but set the Delimiter property for P to plus (+). When the same message is received by the integration node (all elements of P are present, the first two elements of C are present), the data in the message appears as follows:

    P1+C1+C2++P3

    Two delimiter characters have been inserted in the message data for the missing elements of complex element C. If the truncation method had been used, the parser would have interpreted the data value P3 as the value of the third element of complex element C and not the third element of complex element P.


ad09490_.htm | Last updated 2017-07-17 12:45:08