Class SoapFaultMappingExceptionResolver
java.lang.Object
org.springframework.ws.server.endpoint.AbstractEndpointExceptionResolver
org.springframework.ws.soap.server.endpoint.AbstractSoapFaultDefinitionExceptionResolver
org.springframework.ws.soap.server.endpoint.SoapFaultMappingExceptionResolver
- All Implemented Interfaces:
org.springframework.core.Ordered,EndpointExceptionResolver
Exception resolver that allows for mapping exception class names to SOAP Faults. The
mappings are set using the
exceptionMappings property, the format of which is
documented in SoapFaultDefinitionEditor.- Since:
- 1.0.0
-
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 intReturn the depth to the superclass matching.protected @Nullable SoapFaultDefinitiongetFaultDefinition(@Nullable Object endpoint, Exception ex) Template method that returns theSoapFaultDefinitionfor the given exception.voidsetExceptionMappings(Properties mappings) Set the mappings between exception class names and SOAP Faults.Methods inherited from class org.springframework.ws.soap.server.endpoint.AbstractSoapFaultDefinitionExceptionResolver
customizeFault, resolveExceptionInternal, setDefaultFaultMethods inherited from class org.springframework.ws.server.endpoint.AbstractEndpointExceptionResolver
buildLogMessage, getOrder, logException, resolveException, setMappedEndpoints, setOrder, setWarnLogCategory
-
Constructor Details
-
SoapFaultMappingExceptionResolver
public SoapFaultMappingExceptionResolver()
-
-
Method Details
-
setExceptionMappings
Set the mappings between exception class names and SOAP Faults. The exception class name can be a substring, with no wildcard support at present.The values of the given properties object should use the format described in
SoapFaultDefinitionEditor.Follows the same matching algorithm as
SimpleMappingExceptionResolver.- Parameters:
mappings- exception patterns (can also be fully qualified class names) as keys, fault definition texts as values- See Also:
-
getFaultDefinition
Description copied from class:AbstractSoapFaultDefinitionExceptionResolverTemplate method that returns theSoapFaultDefinitionfor the given exception.- Specified by:
getFaultDefinitionin classAbstractSoapFaultDefinitionExceptionResolver- 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.
-
getDepth
Return the depth to the superclass matching.0means ex matches exactly. Returns-1if there's no match. Otherwise, returns depth. Lowest depth wins.Follows the same algorithm as RollbackRuleAttribute, and SimpleMappingExceptionResolver
-