Download FAQ History |  | API 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 the `xsd: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 Platform, 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.net.URI

>     java.util.Calendar
>     java.util.Date

> This release of JAX-RPC also supports several implementation classes of the `java.util.Collection` interface. See Table 12-1.

> Table 12-1 Supported Classes of the Java Collections Framework
> java.util.Collection Subinterface | Implementation Classes
> --- | ---
> `List` | `ArrayList` `LinkedList` `Stack` `Vector`
> `Map` | `HashMap` `Hashtable` `Properties` `TreeMap`
> `Set` | `HashSet` `TreeSet`

> ### Primitives

> JAX-RPC supports the following primitive types of the Java programming language:

>     boolean
>     byte
>     double
>     float
>     int
>     long
>     short

> ### Arrays

> JAX-RPC also supports arrays with members of supported JAX-RPC types. Examples of supported arrays are `int[]` and `String[]`. Multidimensional arrays, such as `BigDecimal[][]`, are also supported.

> ### Value Types

> A value type is a class whose state may be passed between a client and remote service as a method parameter or return value. For example, in an application for a university library, a client might call a remote procedure with a value type parameter named `Book`, a class that contains the fields `Title`, `Author`, and `Publisher`.

> To be supported by JAX-RPC, a value type must conform to the following rules:

> - It must have a public default constructor.
> - It must not implement (either directly or indirectly) the `java.rmi.Remote` interface.
> - Its fields must be supported JAX-RPC types.

> The value type may contain public, private, or protected fields. The field of a value type must meet these requirements:

> - A public field cannot be final or transient.
> - A non-public field must have corresponding getter and setter methods.

> ### 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 of a JavaBeans component, see the section Service Implementation.

Download FAQ History |  | API Search Feedback

All of the material in The Java(TM) Web Services Tutorial is copyright-protected and may not be published in other works without express written permission from Sun Microsystems.