O'Reilly logo

WebLogic: The Definitive Guide by Avinash Chugh, Jon Mountjoy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required