The Java EE 7 Tutorial
28.2 Types Supported by JAX-WS
JAX-WS delegates the mapping of Java programming language types to and from XML definitions to JAXB. Application developers don't need to know the details of these mappings but should be aware that not every class in the Java language can be used as a method parameter or return type in JAX-WS.
The following sections explain the default schema-to-Java and Java-to-schema data type bindings.
28.2.1 Schema-to-Java Mapping
The Java language provides a richer set of data types than XML schema. Table 28-1 lists the mapping of XML data types to Java data types in JAXB.
Table 28-1 Mapping of XML Data Types to Java Data Types in JAXB
XML Schema Type | Java Data Type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
28.2.2 Java-to-Schema Mapping
Table 28-2 shows the default mapping of Java classes to XML data types.
Table 28-2 Mapping of Java Classes to XML Data Types in JAXB
Java Class | XML Data Type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|