org.ws4d.java.service
Class InvocationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.ws4d.java.service.InvocationException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
EventingException, TypeMismatchException

public class InvocationException
extends java.lang.Exception

Exceptions of this class are thrown to indicate the occurrence of a user-defined fault during the invocation of a operation or the dispatching of a DefaultEventSource. The state encapsulated within such an exception allows a caller to determine the type of fault and extract any additional user-defined data attached to it.

See Also:
Serialized Form

Constructor Summary
InvocationException(Fault fault)
          Creates a new instance wrapping the specified fault.
InvocationException(FaultMessage fault)
          Creates a new instance wrapping the specified fault message.
InvocationException(Fault fault, ParameterValue params)
          Creates a new instance representing the specified fault and carrying the given user-defined data params as additional fault details.
InvocationException(Fault fault, java.lang.String reason, ParameterValue params)
          Creates a new instance representing the specified fault with the given reason and carrying the user-defined data params as additional fault details.
 
Method Summary
 java.lang.String getAction()
          Returns the wsa:Action URI of the fault this exception refers to.
 QName getCode()
          Returns the SOAP code of the fault this exception refers to.
 ParameterValue getDetail()
          Returns user-defined additional data about the encapsulated fault.
 java.lang.String getMessage()
           
 DataStructure getReason()
          Returns a data structure of LocalizedString instances, each in a different language/locale, representing the textual reason of the fault this exception refers to.
 QName getSubcode()
          Returns the SOAP subcode of the fault this exception refers to.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InvocationException

public InvocationException(Fault fault)
Creates a new instance wrapping the specified fault.

Parameters:
fault - the fault to encapsulate

InvocationException

public InvocationException(Fault fault,
                           ParameterValue params)
Creates a new instance representing the specified fault and carrying the given user-defined data params as additional fault details.

Parameters:
fault - the fault this exception represents
params - user-defined additional data about the fault

InvocationException

public InvocationException(Fault fault,
                           java.lang.String reason,
                           ParameterValue params)
Creates a new instance representing the specified fault with the given reason and carrying the user-defined data params as additional fault details.

Parameters:
fault - the fault this exception represents
reason - the fault reason
params - user-defined additional data about the fault

InvocationException

public InvocationException(FaultMessage fault)
Creates a new instance wrapping the specified fault message.

Parameters:
fault - the message to extract fault information from
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

getAction

public java.lang.String getAction()
Returns the wsa:Action URI of the fault this exception refers to.

Returns:
the action associated to the fault wrapped by this exception

getCode

public QName getCode()
Returns the SOAP code of the fault this exception refers to.

Returns:
the SOAP code of the wrapped fault

getSubcode

public QName getSubcode()
Returns the SOAP subcode of the fault this exception refers to.

Returns:
the SOAP subcode of the wrapped fault

getReason

public DataStructure getReason()
Returns a data structure of LocalizedString instances, each in a different language/locale, representing the textual reason of the fault this exception refers to.

Returns:
the localized reasons for the fault

getDetail

public ParameterValue getDetail()
Returns user-defined additional data about the encapsulated fault.

Returns:
the additional fault-related data