Name

Package javax.xml.rpc.holders

Synopsis

This package contains a set of classes that are used to simulate method arguments that can be used to receive output values, a feature that is not directly supported by the Java programming language. A holder argument is used wherever the WSDL definition calls for an output or input/output argument. In terms of method call syntax, a service endpoint interface method that uses a holder class looks like this:

public void methodName(IntHolder arg) throws RemoteException;

All holders implement the Holder interface, which is a marker that does not declare any methods. Each holder class can contain a value of a specific type. There are 21 pre-defined holder classes in the javax.xml.rpc.holders package, which correspond to the Java primitive types (such as int), their object wrapper counterparts (such as Integer), and a small number of special cases (such as QNameHolder). A simple naming convention applies to the standard wrapper classes:

  • For a Java primitive type, the class name is formed by capitalizing the first letter of the type name and appending Holder. Hence, the IntHolder class is the holder class for a primitive int, ByteHolder corresponds to byte, and so on.

  • For a primitive wrapper type, the class name consists of the wrapper class name followed by WrapperHolder. The holder for the Integer class is therefore IntegerWrapperHolder

JAX-RPC is capable of generating additional holder classes for method arguments of other types that are defined ...

Get Java Web Services in a Nutshell 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.