This topic describes how to configure the message model, see The message model in the WebSphere Message Broker documentation, and includes the following sections:
Some objects, such as elements, have both properties that are associated with them as stand-alone objects, and properties that are associated with them as members of another object (such as a type, or a group). This topic lists these properties in two tables:
The tables list only the properties that are set in this sample. Many more properties are available, but in this sample most are left to their default values.
To configure the properties of the objects as stand-alone objects (such as elements), set the properties as listed in the following table:
Object | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|
Town | ||||
Street | ||||
HouseNo | ||||
{Local complexType} | Composition = orderedSet | Data Element Separation = Tagged Delimited Group Indicator = [ Group Terminator = ] Delimiter = * Tag Data Separator = : |
Composition for {Local complexType} is set to OrderedSet because the elements must be shown in order. Alternatively, Composition can be set to Sequence. When Composition is set to OrderedSet, elements are shown in order, and cannot be duplicated. When Composition is set to Sequence, elements are still shown in order, but can be duplicated. A duplicate element is an element included more than once anywhere within the complex type.
The other logical properties for {Local complexType} take their default values. The default setting for Content Validation is Closed; which means that the complex type {Local complexType} can contain only the elements that are its members. If Content Validation is set to Open, this complex type can contain any element, and not just those defined in this message set, see Message sets overview in the WebSphere Message Broker documentation.
Data Element Separation is set to Tagged Delimited to demonstrate different types of data element separation, see TDS Format message set properties in the WebSphere Message Broker documentation.
To configure the properties of the objects as members of other objects (such as types, or groups), set the properties as listed in the following table:
Object | Member of | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|---|
Town | Address > {Local complexType} | Length count = 20 | |||
Street | Address > {Local complexType} | Length count = 20 | |||
HouseNo | Address > {Local complexType} | Length count = 4 Physical Type = External Decimal 'Signed' check box = not selected String Justification = Left Justify Padding Character = SPACE |
|||
{Local complexType} | Address |
Some objects, such as elements, have two sets of properties: those that are associated with the objects as stand-alone objects, and those that are associated with objects as members of another object (such as a type, or a group). This topic lists these properties in two tables:
The tables list only the properties that are set in this sample. Many more properties are available, but in this sample most properties take their default values.
To configure the properties of the objects as stand-alone objects (such as elements), set the properties as shown in the following table. Use the instructions in the previous section, Configuring properties of the Address message definition.
Object | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|
VideoTitle | ||||
DueDate | ||||
Cost | ||||
{Local complexType} |
|
Data Element Separation = All Elements Delimited Group Indicator = [ Group Terminator = ] Delimiter = * |
You do not have to set any logical properties for {Local complexType}, because these properties take their default values. Data Element Separation is set to All Elements Delimited to demonstrate the different types of data element separation. For more information about how All Elements Delimited differs from Tagged Delimited, see TDS format: Data element separation in the WebSphere Message Broker documentation.
To configure the properties of the objects as members of other objects (such as types, or groups), set the properties as shown in the following table. Use the instructions in the previous section, Configuring properties of the Address message definition.
Object | Member of | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|---|
VideoTitle | Borrowed > Anonymous | Length Count = 20 | Render = XMLAttribute | ||
DueDate | Borrowed > Anonymous | Length Count = 10 DateTime Format = yyyy-MM-dd |
DateTime Format = yyyy-MM-dd | ||
Cost | Borrowed > Anonymous | Length Count = 4 | |||
{Local complexType} | Borrowed |
The rendering option for VideoTitle is set to XMLAttribute to demonstrate different ways of configuring the message model. Creating VideoTitle as an element and rendering it as an attribute is one possible way of configuring the object. VideoTitle can be configured in any of the following ways:
In the last two options, VideoTitle is shown in exactly the same form in the message. That is, you can achieve the same result by either configuring the object as an attribute, or configuring it as an element rendered as an attribute. Rendering options can be used if required, for example, change an element into an attribute (or vice versa) after the object has been created, but there are other reasons for using different rendering options. For example, there might be business reasons for creating several elements with the same name, and then using rendering options to give them different identifiers.
Some objects, such as elements, have two sets of properties: those that are associated with the objects as stand-alone objects, and those that are associated with objects as members of another object (such as a type, or a group). This topic lists these properties in two tables:
The tables list only the properties that are set in this sample. Many more properties are available, but in this sample most take their default values.
To configure the properties of the objects as stand-alone objects (such as elements), set the properties as shown in the following table. Use the instructions in the previous section, Configuring properties of the Address message definition.
Object | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|
FirstName | Tag = FirstName | |||
LastName | Tag = LastName | |||
Title | Tag = Title | |||
NameType | Composition = orderedSet Content Validation = Open |
Data Element Separation = Tagged Delimited |
||
ID | Tag = ID | |||
CreditCardNo | Tag = CreditCardNo | |||
DrivingLicenseNo | Tag = DrivingLicenseNo | |||
PassportNo | Tag = PassportNo | |||
IdGroup | Composition = Choice Content Validation = Closed |
Data Element Separation = Tagged Delimited Delimiter = & Tag Data Separator = : |
||
brw:Borrowed | ||||
Magazine | Tag = Magazine | |||
CustomerType | Composition = Sequence Content Validation = Open |
Data Element Separation = Tagged Delimited Group Indicator = { Group Terminator = } Delimiter = & Tag Data Separator = : |
Setting the Content Validation of NameType to Open means that duplicate elements are not allowed, but other elements that are not defined in this type are allowed. A duplicate element is an element included more than once anywhere within the complex type. Content Validation for NameType is set to Open to demonstrate another Content Validation option.
Composition of NameType is set to OrderedSet because the elements must be shown in order. Alternatively, Composition can be set to Sequence. Sequence is the default value for Composition, and is used, for example, for CustomerType. When Composition is set to OrderedSet, elements are shown in order, and cannot be duplicated. When Composition is set to Sequence, elements are still shown in order, but can be duplicated.
Setting Composition of IdGroup to Choice means that you can now choose only one of PassportNo, DrivingLicenseNo, or CreditCardNo as the type of identifier that is used as proof of identity when a customer opens an account with the video store. Setting Content Validation to Closed means that you can choose from these three options only. For example, if Content Validation is set to Open Defined, you can choose other elements that are defined within your message set.
To configure the properties of the objects as members of other objects (such as types, or groups), set the properties as shown in the following table. You must perform all the configuration tasks listed in the following table in the Customer.mxsd message definition file. Remember that you must select the object under the object of which it is a member. Use the instructions in the previous section, Configuring properties of the Address message definition.
Object | Member of | Logical properties | CWF properties | XML properties | TDS properties |
---|---|---|---|---|---|
FirstName | NameType | Length Count = 20 Repeat Count = 1 | |||
LastName | NameType | Length Count = 20 | Render = XMLAttribute | ||
Title | NameType | Length Count = 3 Repeat Count = 1 | |||
NameType | Customer | ||||
ID | CustomerType | Length Count = 1 Repeat Count = 1 |
|||
CreditCardNo | IdGroup | Min Occurs = 0 | Length Count = 20 |
|
|
DrivingLicenseNo | IdGroup | Min Occurs = 0 | Length Count = 20 | ||
PassportNo | IdGroup | Min Occurs = 0 | Length Count = 20 | ||
IdGroup | |||||
brw: Borrowed | CustomerType | Min Occurs = 0 Max Occurs = 3 |
Repeat Count = 2 | Repeating Element Delimiter = * | |
Magazine | CustomerType | Min Occurs = 0 | |||
CustomerType |
The rendering option for LastName is set to XMLAttribute to demonstrate different ways of configuring the message model. This option is also set for VideoTitle in the previous section, see Configuring properties of the Borrowed message definition.
For the object brw:Borrowed, the repeat count for CWF is set to 2 to reflect the number of videos borrowed, as indicated in the input message. Because the XML and TDS formats use delimiting tags to show where each repeat starts and finishes, you do not have to specify a repeat count for XML and TDS. If you do not know in advance how many times a repeating element repeats, you must include an additional integer field in the message model, use ESQL to populate this field dynamically with the number of repeats, change Repeat Count to Repeat Reference, and put in a reference to the value of that integer field.
Because the element Magazine is of type Boolean, you must also configure the Boolean values used throughout the message set. To set the Boolean values:
Property | Value |
---|---|
Boolean True Value | 31 |
Boolean False Value | 30 |
Boolean Null Value | 00 |