org.springframework.ws.soap.server.endpoint
Class AbstractSoapFaultDefinitionExceptionResolver
java.lang.Object
org.springframework.ws.server.endpoint.AbstractEndpointExceptionResolver
org.springframework.ws.soap.server.endpoint.AbstractSoapFaultDefinitionExceptionResolver
- All Implemented Interfaces:
- 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:
setDefaultFault(SoapFaultDefinition)
,
getFaultDefinition(Object,Exception)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractSoapFaultDefinitionExceptionResolver
public AbstractSoapFaultDefinitionExceptionResolver()
setDefaultFault
public void setDefaultFault(SoapFaultDefinition defaultFault)
- Set the default fault. This fault will be returned if no specific mapping was found.
getFaultDefinition
protected abstract SoapFaultDefinition getFaultDefinition(Object endpoint,
Exception ex)
- Template method that returns the
SoapFaultDefinition
for the given exception.
- Parameters:
endpoint
- the executed endpoint, or null
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 by
AbstractEndpointExceptionResolver.resolveException(org.springframework.ws.context.MessageContext, java.lang.Object, java.lang.Exception)
.
- Specified by:
resolveExceptionInternal
in class AbstractEndpointExceptionResolver
- Parameters:
messageContext
- current message contextendpoint
- the executed endpoint, or null
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:
AbstractEndpointExceptionResolver.resolveException(MessageContext,Object,Exception)
customizeFault
protected void customizeFault(Object endpoint,
Exception ex,
SoapFault fault)
- Customize the
SoapFault
created by this resolver. Called for each created fault
The 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, or null
if none chosen at the time of the exceptionex
- the exception to be handledfault
- the created fault
Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.