Java Platform, Enterprise Edition (Java EE) 8 The Java EE Tutorial |
Previous | Next | Contents |
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:
The Java language provides a richer set of data types than XML schema. Table 31-1 lists the mapping of XML data types to Java data types in JAXB.
Table 31-1 Mapping of XML Data Types to Java Data Types in JAXB
XML Schema Type |
Java Data Type |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Table 31-2 shows the default mapping of Java classes to XML data types.
Table 31-2 Mapping of Java Classes to XML Data Types in JAXB
Java Class |
XML Data Type |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Previous | Next | Contents |