Class AbstractSoapFaultDefinitionExceptionResolver
java.lang.Object
org.springframework.ws.server.endpoint.AbstractEndpointExceptionResolver
org.springframework.ws.soap.server.endpoint.AbstractSoapFaultDefinitionExceptionResolver
- All Implemented Interfaces:
org.springframework.core.Ordered,EndpointExceptionResolver
- Direct Known Subclasses:
SoapFaultAnnotationExceptionResolver,SoapFaultMappingExceptionResolver
public abstract class AbstractSoapFaultDefinitionExceptionResolver
extends AbstractEndpointExceptionResolver
Abstract base class for SOAP-based
EndpointExceptionResolver implementations that depend on
SoapFaultDefinition. Provides a default endpoint property, and a template method that provides the definition
for a given exception.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Field Summary
Fields inherited from class org.springframework.ws.server.endpoint.AbstractEndpointExceptionResolver
loggerFields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcustomizeFault(Object endpoint, Exception ex, SoapFault fault) Customize theSoapFaultcreated by this resolver.protected abstract SoapFaultDefinitiongetFaultDefinition(Object endpoint, Exception ex) Template method that returns theSoapFaultDefinitionfor the given exception.protected final booleanresolveExceptionInternal(MessageContext messageContext, Object endpoint, Exception ex) Template method for resolving exceptions that is called byAbstractEndpointExceptionResolver.resolveException(org.springframework.ws.context.MessageContext, java.lang.Object, java.lang.Exception).voidsetDefaultFault(SoapFaultDefinition defaultFault) Set the default fault.Methods inherited from class org.springframework.ws.server.endpoint.AbstractEndpointExceptionResolver
buildLogMessage, getOrder, logException, resolveException, setMappedEndpoints, setOrder, setWarnLogCategory
-
Constructor Details
-
AbstractSoapFaultDefinitionExceptionResolver
public AbstractSoapFaultDefinitionExceptionResolver()
-
-
Method Details
-
setDefaultFault
Set the default fault. This fault will be returned if no specific mapping was found. -
getFaultDefinition
Template method that returns theSoapFaultDefinitionfor the given exception.- Parameters:
endpoint- the executed endpoint, ornullif none chosen at the time of the exceptionex- the exception to be handled- Returns:
- the definition mapped to the exception, or
nullif none is found.
-
resolveExceptionInternal
protected final boolean resolveExceptionInternal(MessageContext messageContext, Object endpoint, Exception ex) Description copied from class:AbstractEndpointExceptionResolverTemplate method for resolving exceptions that is called byAbstractEndpointExceptionResolver.resolveException(org.springframework.ws.context.MessageContext, java.lang.Object, java.lang.Exception).- Specified by:
resolveExceptionInternalin classAbstractEndpointExceptionResolver- Parameters:
messageContext- current message contextendpoint- the executed endpoint, ornullif none chosen at the time of the exceptionex- the exception that got thrown during endpoint execution- Returns:
trueif resolved;falseotherwise- See Also:
-
customizeFault
Customize theSoapFaultcreated by this resolver. Called for each created faultThe default implementation is empty. Can be overridden in subclasses to customize the properties of the fault, such as adding details, etc.
- Parameters:
endpoint- the executed endpoint, ornullif none chosen at the time of the exceptionex- the exception to be handledfault- the created fault
-