Datatypes
WebLogic supports a number of different Java types that can be used as parameter and return values for your web service operations. If you rely on these types, WebLogic automatically converts between their XML and Java representations. If a web service relies on complex types — for instance, an operation accepts an input parameter representing an instance of a custom Java class — you need a set of serialization classes that can convert between their XML and Java representations. There are two ways to generate this set of serialization classes:
- Auto-generation of serialization classes
Given a class definition that adheres to certain reasonable constraints, WebLogic’s Ant tasks let you automatically generate the required serialization classes and XML Schemas that represent the class.
- Manual creation of serialization classes
If the class definition doesn’t comply with these constraints, you must manually implement the serialization logic and specify the XML Schemas that represent the datatypes.
In this section, we look at how to work with the built-in types, to automatically create the required serialization classes and XML Schemas for any custom types, and to manually provide this support if needed.
Built-in Types
The built-in datatypes are those supported by the XML Schema specification (see the XML Schema datatype specification at http://www.w3.org/2001/XMLSchema). This mandates that all the built-in datatypes have the namespace name http://www.w3.org/2001/XMLSchema. The ...
Get WebLogic: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.