Spring Web Services Framework

org.springframework.ws.soap.server.endpoint
Class SimpleSoapExceptionResolver

java.lang.Object
  extended by org.springframework.ws.server.endpoint.AbstractEndpointExceptionResolver
      extended by org.springframework.ws.soap.server.endpoint.SimpleSoapExceptionResolver
All Implemented Interfaces:
Ordered, EndpointExceptionResolver

public class SimpleSoapExceptionResolver
extends AbstractEndpointExceptionResolver

Simple, SOAP-specific EndpointExceptionResolver implementation that stores the exception's message as the fault string.

The fault code is always set to a Server (in SOAP 1.1) or Receiver (SOAP 1.2).

Since:
1.0.0
Author:
Arjen Poutsma

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
SimpleSoapExceptionResolver()
           
 
Method Summary
protected  void customizeFault(MessageContext messageContext, Object endpoint, Exception ex, SoapFault fault)
          Empty template method to allow subclasses an opportunity to customize the given SoapFault.
 Locale getLocale()
          Returns the locale for the faultstring or reason of the SOAP Fault.
protected  boolean resolveExceptionInternal(MessageContext messageContext, Object endpoint, Exception ex)
          Template method for resolving exceptions that is called by AbstractEndpointExceptionResolver.resolveException(org.springframework.ws.context.MessageContext, java.lang.Object, java.lang.Exception).
 void setLocale(Locale locale)
          Sets the locale for the faultstring or reason of the SOAP Fault.
 
Methods inherited from class org.springframework.ws.server.endpoint.AbstractEndpointExceptionResolver
buildLogMessage, getOrder, logException, resolveException, setMappedEndpoints, setOrder, setWarnLogCategory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleSoapExceptionResolver

public SimpleSoapExceptionResolver()
Method Detail

getLocale

public Locale getLocale()
Returns the locale for the faultstring or reason of the SOAP Fault.

Defaults to Locale.ENGLISH.


setLocale

public void setLocale(Locale locale)
Sets the locale for the faultstring or reason of the SOAP Fault.

Defaults to Locale.ENGLISH.


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 context
endpoint - the executed endpoint, or null if none chosen at the time of the exception
ex - 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(MessageContext messageContext,
                              Object endpoint,
                              Exception ex,
                              SoapFault fault)
Empty template method to allow subclasses an opportunity to customize the given SoapFault. Called from resolveExceptionInternal(MessageContext,Object,Exception).

Parameters:
messageContext - current message context
endpoint - the executed endpoint, or null if none chosen at the time of the exception
ex - the exception that got thrown during endpoint execution
fault - the SOAP fault to be customized.

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.