throws
declarations to indicate which exceptions may be
thrown back to the client from a service implementation. Callers should
implement AsyncCallback.onFailure(Throwable) to check for any
exceptions specified in the service interface.
InvocationException
because the
problem was with the invocation attempt itself rather than with the
service implementation itself.
An RPC can also fail with an invocation exception if the call does reach
the server, but an undeclared exception occurs during normal processing
of the call. There are many reasons such a situation could arise: a
necessary server resource, such as a database, might be unavailable, a
NullPointerException
could be thrown due to a bug in the
service implementation, and so on. In these cases, a
InvocationException is thrown in
application code.