org.apache.tuscany.sca.interfacedef.java.jaxws
Class JAXWSFaultExceptionMapper

java.lang.Object
  extended by org.apache.tuscany.sca.interfacedef.java.jaxws.JAXWSFaultExceptionMapper
All Implemented Interfaces:
FaultExceptionMapper

public class JAXWSFaultExceptionMapper
extends java.lang.Object
implements FaultExceptionMapper

JAX-WS ExceptionHandler


Field Summary
static java.lang.String GETCAUSE
           
static java.lang.String GETCLASS
           
static java.lang.String GETLOCALIZEDMESSAGE
           
static java.lang.String GETSTACKTRACE
           
 
Constructor Summary
JAXWSFaultExceptionMapper(DataBindingExtensionPoint dataBindingExtensionPoint, XMLAdapterExtensionPoint xmlAdapters)
           
 
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> exceptionType, Operation operation, boolean generatingFaultBean)
          Introspect an exception class to find out the fault data type following the WSDL2Java mapping rules.
static boolean isMappedGetter(java.lang.String methodName)
           
 void setDataBindingExtensionPoint(DataBindingExtensionPoint dataBindingExtensionPoint)
           
 java.lang.Throwable wrapFaultInfo(DataType<DataType> exceptionType, java.lang.String message, java.lang.Object faultInfo, java.lang.Throwable cause, Operation operation)
          The following is quoted from the JAX-WS Specification v2.1 WrapperException(String message, FaultBean faultInfo)
A constructor where WrapperException is replaced with the name of the generated wrapper exception and FaultBean is replaced by the name of the generated fault bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GETCAUSE

public static final java.lang.String GETCAUSE
See Also:
Constant Field Values

GETLOCALIZEDMESSAGE

public static final java.lang.String GETLOCALIZEDMESSAGE
See Also:
Constant Field Values

GETSTACKTRACE

public static final java.lang.String GETSTACKTRACE
See Also:
Constant Field Values

GETCLASS

public static final java.lang.String GETCLASS
See Also:
Constant Field Values
Constructor Detail

JAXWSFaultExceptionMapper

public JAXWSFaultExceptionMapper(DataBindingExtensionPoint dataBindingExtensionPoint,
                                 XMLAdapterExtensionPoint xmlAdapters)
Method Detail

wrapFaultInfo

public java.lang.Throwable wrapFaultInfo(DataType<DataType> exceptionType,
                                         java.lang.String message,
                                         java.lang.Object faultInfo,
                                         java.lang.Throwable cause,
                                         Operation operation)
The following is quoted from the JAX-WS Specification v2.1

Specified by:
wrapFaultInfo in interface FaultExceptionMapper
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

public java.lang.Object getFaultInfo(java.lang.Throwable exception,
                                     java.lang.Class<?> faultBeanClass,
                                     Operation operation)
Description copied from interface: FaultExceptionMapper
Retrieve the fault info from a java exception

Specified by:
getFaultInfo in interface FaultExceptionMapper
Parameters:
exception - The java exception that represents the fault data
operation - TODO
Returns:
The fault data

introspectFaultDataType

public boolean introspectFaultDataType(DataType<DataType> exceptionType,
                                       Operation operation,
                                       boolean generatingFaultBean)
Description copied from interface: FaultExceptionMapper
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

Specified by:
introspectFaultDataType in interface FaultExceptionMapper
Parameters:
exceptionType - 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

isMappedGetter

public static boolean isMappedGetter(java.lang.String methodName)

setDataBindingExtensionPoint

public void setDataBindingExtensionPoint(DataBindingExtensionPoint dataBindingExtensionPoint)