The Dynamic Invocation Interface
A JAX-RPC implementation typically implements dynamic proxies by using the more primitive dynamic invocation interface (or DII for short). As well as being used internally in this way, the DII is a public API that provides another way for application code to access a web service without needing to generate stub classes. Creating an application that uses the DII involves more coding effort than using either dynamic proxies or precompiled stubs. However, the DII makes it potentially possible to write clients that can work with web services that are not discovered until runtime, in much the same way as the Java reflection feature allows software tools to call methods on classes that it does not know about at compile time.
The steps required to use the dynamic invocation interface are as follows:
A client application gets a
Serviceobject for a web service.
Serviceobject, the application creates a
Callobject that is used to invoke the service’s operations.
Callis the central class of the DII.
Methods of the
Callinterface are used to specify which operation is to be called, and to discover and list the Java and XML types of the operation’s arguments and its return types.
The application invokes the operation by calling the
invoke( )method of the
Callobject, which provides the result of the operation as its return value.
interface provides five methods that can be used to obtain
public Call createCall( ) throws ServiceException ...