A complex type describes the structure of one or more complex elements.
Complex types are an essential part of every message model because they define the logical structure of the messages and elements in the model.
Complex types define the structure of the messages and elements in the message model. By combining elements, attributes, groups, and wildcards, almost any message structure can be modeled.
Most complex types contain some elements, and some contain a large hierarchy of complex elements. The elements within a complex type are always contained within a group. This group can be local to the complex type, in which case the Message Definition Editor hides it from view.
Alternatively, the group that contains the elements can be a global group, and this group defines the element content, the composition, and the content validation for the complex type.
If a complex type is derived from a simple type, it cannot contain any element content.
Complex types can be global or local. A global complex type can be used as the basis for more than one complex element. It must be given a unique name by which it can be referenced. A local complex type is associated with a single complex element, and is not available for reuse elsewhere in the message model. Local types do not have a name, and are sometimes referred to as anonymous types.
The composition of a complex type describes how the members of the type are organized. For more information, see Message model objects: groups.
A complex type has parameters that control whether other types can be derived from it (final) and whether other types can substitute for it (block). For more information, see Substitution groups in the message model and Message model objects: type inheritance.