[SWS-490] log Exceptions in SoapFaultMappingExceptionResolver (like spring webmvc SimpleMappingExceptionResolver) Created: 03/Mar/09  Updated: 04/May/12  Resolved: 12/May/09

Status: Closed
Project: Spring Web Services
Component/s: Core
Affects Version/s: 1.5.6
Fix Version/s: 1.5.7

Type: Improvement Priority: Major
Reporter: Nicholas Blair Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The SimpleMappingExceptionResolver class in the Spring Web MVC project allows you to specify a "warnLogCategory"; when exceptions are resolved, and "WARN" level is available for the logger in the specified category, the SimpleMappingExceptionResolver logs the exception.

The SoapFaultMappingExceptionResolver methods involved in resolving an exception are all marked final, preventing extension of this class in order to add similar logging behavior.

The SoapFaultMappingExceptionResolver works great in returning SOAP Faults to clients in the event of an exception in the underlying business code, however my endpoint's log file does not contain any record of the problem.



 Comments   
Comment by Nicholas Blair [ 03/Mar/09 ]

AbstractEndpointExceptionResolver (resolveException) or AbstractSoapFaultDefinitionExceptionResolver (resolveExceptionInternal) appear to be the target for implementing this behavior.

If SimpleMappingExceptionResolver from Spring Web MVC is a guide, the latter choice (resolveExceptionInternal in AbstractSoapFaultDefinitionExceptionResolver) would be a similar location for the logging function.

Comment by Nicholas Blair [ 25/Mar/09 ]

I noticed that if you set the log level to DEBUG for the class org.springframework.ws.soap.server.SoapMessageDispatcher, you will get any Exceptions logged before they are converted to SOAP Faults for response (message is "Endpoint invocation resulted in exception - responding with Fault").

The undesirable side effect of this however is the other DEBUG logging in that class results in 2 log messages per web services request.

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Fri Dec 15 23:38:13 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.