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
logger
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
customizeFault
(Object endpoint, Exception ex, SoapFault fault) Customize theSoapFault
created by this resolver.protected abstract SoapFaultDefinition
getFaultDefinition
(Object endpoint, Exception ex) Template method that returns theSoapFaultDefinition
for the given exception.protected final boolean
resolveExceptionInternal
(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)
.void
setDefaultFault
(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 theSoapFaultDefinition
for the given exception.- Parameters:
endpoint
- the executed endpoint, ornull
if none chosen at the time of the exceptionex
- the exception to be handled- Returns:
- the definition mapped to the exception, or
null
if none is found.
-
resolveExceptionInternal
protected final boolean resolveExceptionInternal(MessageContext messageContext, Object endpoint, Exception ex) Description copied from class:AbstractEndpointExceptionResolver
Template method for resolving exceptions that is called byAbstractEndpointExceptionResolver.resolveException(org.springframework.ws.context.MessageContext, java.lang.Object, java.lang.Exception)
.- Specified by:
resolveExceptionInternal
in classAbstractEndpointExceptionResolver
- Parameters:
messageContext
- current message contextendpoint
- the executed endpoint, ornull
if none chosen at the time of the exceptionex
- the exception that got thrown during endpoint execution- Returns:
true
if resolved;false
otherwise- See Also:
-
customizeFault
Customize theSoapFault
created 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, ornull
if none chosen at the time of the exceptionex
- the exception to be handledfault
- the created fault
-