XML-to-Java Mapping for Built-in Data Types Java-to-XML Mapping for Built-In Data Types

5-2 Getting Started With JAX-RPC Web Services for Oracle WebLogic Server

5.2 Supported Built-In Data Types

The following sections describe the built-in data types supported by WebLogic Web services and the mapping between their XML and Java representations. As long as the data types of the parameters and return values of the back-end components that implement your Web service are in the set of built-in data types, WebLogic Server automatically converts the data between XML and Java. If, however, you use user-defined data types, then you must create the data binding artifacts that convert the data between XML and Java.WebLogic Server includes the jwsc and wsdlc Ant tasks that can automatically generate the data binding artifacts for most user-defined data types. See Section 5.3, Supported User-Defined Data Types for a list of supported XML and Java data types.

5.2.1 XML-to-Java Mapping for Built-in Data Types

The following table lists the supported XML Schema data types target namespace http:www.w3.org2001XMLSchema and their corresponding Java data types. For a list of the supported user-defined XML data types, see Section 5.2.2, Java-to-XML Mapping for Built-In Data Types. Note: As of WebLogic Server 9.1, using XMLBeans 1.x data types in other words, extensions of com.bea.xml.XmlObject as parameters or return types of a WebLogic Web service is deprecated. New applications should use XMLBeans 2.x data types. If a Web service uses XMLBeans that are compiled with the -noupa option, then -Dweblogic.wsee.bind.setCompileNoUpaRule=true flag is required to be set in the WebLogic server startup script to ensure the Web service deploys successfully.Otherwise, deployment will fail with the following error: cos-nonambig: Content model violates the unique particle attribution rule . Table 5–1 Mapping XML Schema Built-in Data Types to Java Data Types XML Schema Data Type Equivalent Java Data Type lower case indicates a primitive data type boolean boolean byte byte short short int int long long float float double double integer java.math.BigInteger decimal java.math.BigDecimal string java.lang.String dateTime java.util.Calendar Understanding Data Binding 5-3

5.2.2 Java-to-XML Mapping for Built-In Data Types

For a list of the supported user-defined Java data types, see Section 5.3.2, Supported Java User-Defined Data Types. base64Binary byte[] hexBinary byte[] duration java.lang.String time java.util.Calendar date java.util.Calendar gYearMonth java.util.Calendar gYear java.util.Calendar gMonthDay java.util.Calendar gDay java.util.Calendar gMonth java.util.Calendar anyURI java.net.URI NOTATION java.lang.String token java.lang.String normalizedString java.lang.String language java.lang.String Name java.lang.String NMTOKEN java.lang.String NCName java.lang.String NMTOKENS java.lang.String[] ID java.lang.String IDREF java.lang.String ENTITY java.lang.String IDREFS java.lang.String[] ENTITIES java.lang.String[] nonPositiveInteger java.math.BigInteger nonNegativeInteger java.math.BigInteger negativeInteger java.math.BigInteger unsignedLong java.math.BigInteger positiveInteger java.math.BigInteger unsignedInt long unsignedShort int unsignedByte short Qname javax.xml.namespace.QName Table 5–1 Cont. Mapping XML Schema Built-in Data Types to Java Data Types XML Schema Data Type Equivalent Java Data Type lower case indicates a primitive data type 5-4 Getting Started With JAX-RPC Web Services for Oracle WebLogic Server

5.3 Supported User-Defined Data Types