org.apache.tuscany.sca.interfacedef
Interface FaultExceptionMapper

All Known Implementing Classes:
JAXWSFaultExceptionMapper

public interface FaultExceptionMapper

This interface represents the mapping between WSDL faults and Java exceptions


Method Summary
 java.lang.Object getFaultInfo(java.lang.Throwable exception, java.lang.Class<?> faultBeanClass, Operation operation)
          Retrieve the fault info from a java exception
 boolean introspectFaultDataType(DataType<DataType> exceptionDataType, Operation operation, boolean generatingFaultBean)
          Introspect an exception class to find out the fault data type following the WSDL2Java mapping rules.
 java.lang.Throwable wrapFaultInfo(DataType<DataType> exceptionType, java.lang.String message, java.lang.Object faultInfo, java.lang.Throwable cause, Operation operation)
          Create a java exception to wrap the fault data
 

Method Detail

introspectFaultDataType

boolean introspectFaultDataType(DataType<DataType> exceptionDataType,
                                Operation operation,
                                boolean generatingFaultBean)
Introspect an exception class to find out the fault data type following the WSDL2Java mapping rules. The result will be populated into the logical type of the exception data type

Parameters:
exceptionDataType - The data type representing a java exception class
operation - TODO
generatingFaultBean - If JAXWS Section 3.7 Fault Bean will be generated
Returns:
true if the introspection can recognize the exception data type

wrapFaultInfo

java.lang.Throwable wrapFaultInfo(DataType<DataType> exceptionType,
                                  java.lang.String message,
                                  java.lang.Object faultInfo,
                                  java.lang.Throwable cause,
                                  Operation operation)
Create a java exception to wrap the fault data

Parameters:
exceptionType - The DataType for the exception
message - message for the exception
faultInfo - The fault data
cause - of the exception
operation - TODO
Returns:
An instance of java exception to represent the fault

getFaultInfo

java.lang.Object getFaultInfo(java.lang.Throwable exception,
                              java.lang.Class<?> faultBeanClass,
                              Operation operation)
Retrieve the fault info from a java exception

Parameters:
exception - The java exception that represents the fault data
faultBeanClass -
operation - TODO
Returns:
The fault data