LibraryLink ToToggle FramesPrintFeedback

Primitive Types

When a message part is defined using one of the XML Schema primitive types, the generated parameter's type is mapped to a corresponding Java native type. The same pattern is used when mapping elements that are defined within the scope of a complex type. The resulting field is of the corresponding Java native type.

Table 12.1 lists the mapping between XML Schema primitive types and Java native types.

Mapping XML Schema primitive types to Java primitive types does not work for all possible XML Schema constructs. Several cases require that an XML Schema primitive type is mapped to the Java primitive type's corresponding wrapper type. These cases include:

  • An element element with its nillable attribute set to true as shown:

    <element name="finned" type="xsd:boolean"
             nillable="true" />
  • An element element with its minOccurs attribute set to 0 and its maxOccurs attribute set to 1, or its maxOccurs attribute not specified, as shown :

    <element name="plane" type="xsd:string" minOccurs="0" />
  • An attribute element with its use attribute set to optional, or not specified, and having neither its default attribute nor its fixed attribute specified, as shown:

    <element name="date">
        <attribute name="calType" type="xsd:string"
                   use="optional" />

Table 12.2 shows how XML Schema primitive types are mapped into Java wrapper classes in these cases.