public interface Stub {
// Public Constants
public static final String ENDPOINT_ADDRESS_PROPERTY;
// ="javax.xml.rpc.service.endpoint.address"
public static final String PASSWORD_PROPERTY;
// ="javax.xml.rpc.security.auth.password"
public static final String SESSION_MAINTAIN_PROPERTY;
// ="javax.xml.rpc.session.maintain"
public static final String USERNAME_PROPERTY;
// ="javax.xml.rpc.security.auth.username"
// Public Instance Methods
public abstract Object _getProperty( String name);
public abstract Iterator _getPropertyNames( );
public abstract void _setProperty(String name, Object value);
}
Stub is an interface implemented by all
client-side stub classes generated by the
wscompile tool or a vendor-specific equivalent.
The task of a Stub object is to marshall the
parameters for a remote method call made on the client into a SOAP
message, to unmarshall the reply to create the return value from the
call, if there is one, and to update any output parameters supplied
in the form of Holder objects. The code for a stub
class is entirely generated by wscompile; the only
methods that are of interest to application code are declared in the
Stub interface.
A Stub contains a collection of properties that
application code can set to control the operation of the JAX-RPC
runtime when invoking the remote method. To set a property, use the
_setProperty( ) method. Use the
_getProperty( ) method to retrieve the value of a
named property and the _getPropertyNames( ) method
to get the names of the properties that may be used. (Note, however,
that the JAX-RPC 1.0 reference implementation implements this method
differently�it returns the names of the properties for which
values have actually been set. The text here reflects the
specification.)
Only the property names defined by the interface may be used with the
_getProperty( ) and _setProperty(
) methods; not all implementations are required to support
all of the properties. A JAXRPCException is thrown
for a property that is not recognized or not supported. The
properties defined by the interface are as follows:
- USERNAME_PROPERTY
-
Holds the username associated with the caller. This property need
only be set if the service is protected by HTTP basic authentication.
All implementations must support this property.
- PASSWORD_PROPERTY
-
The caller's password. This property, which must be
supported by all implementations, is used together with
USERNAME_PROPERTY.
- ENDPOINT_ADDRESS_PROPERTY
-
A string containing the address of the service endpoint interface
(i.e., the port address) as a URI. For services accessed over HTTP,
this is a URL. Support of this property is optional.
- SESSION_MAINTAIN_PROPERTY
-
A value of type Boolean that specifies whether the
client will allow the service to maintain HTTP session information
for the client between calls. A service implementation that
implements the
javax.xml.rpc.server.ServiceLifecycle interface
can make use of sessions to store state between method calls if this
property is set to true. Support for this property is
mandatory.