FAQ
History |
Search
Feedback |
Types Supported By JAX-RPC
Behind the scenes, JAX-RPC maps types of the Java programming language to XML/WSDL definitions. For example, JAX-RPC maps the
java.lang.String
class to thexsd:string
XML data type. Application developers don't need to know the details of these mappings, but they should be aware that not every class in the Java 2 Standard Edition (J2SE) can be used as a method parameter or return type in JAX-RPC.J2SE SDK Classes
JAX-RPC supports the following J2SE SDK classes:
java.lang.Boolean java.lang.Byte java.lang.Double java.lang.Float java.lang.Integer java.lang.Long java.lang.Short java.lang.String java.math.BigDecimal java.math.BigInteger java.util.Calendar java.util.DateThis release of JAX-RPC also supports several implementation classes of the
java.util.Collection
interface. See Table 9-1.
Primitives
JAX-RPC supports the following primitive types of the Java programming language:
Arrays
JAX-RPC also supports arrays with members of supported JAX-RPC types. Examples of supported arrays are
int[]
andString[]
. Multidimensional arrays, such asBigDecimal[][]
, are also supported.Application Classes
JAX-RPC also supports classes that you've written for your applications. In an order processing application, for example, you might provide classes named
Order
,LineItem
, andProduct
. The JAX-RPC Specification refers to such classes as value types, because their values (or states) may be passed between clients and remote services as method parameters or return values.To be supported by JAX-RPC, an application class must conform to the following rules:
The class may contain public, private, or protected fields. For its value to be passed (or returned) during a remote call, a field must meet these requirements:
JavaBeans Components
JAX-RPC also supports JavaBeans components, which must conform to the same set of rules as application classes. In addition, a JavaBeans component must have a getter and setter method for each bean property. The type of the bean property must be a supported JAX-RPC type. For an example, see the section JavaBeans Components.
FAQ
History |
Search
Feedback |
All of the material in The J2EE Tutorial for the Sun ONE Platform is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.