Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-490

log Exceptions in SoapFaultMappingExceptionResolver (like spring webmvc SimpleMappingExceptionResolver)

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.6
    • Fix Version/s: 1.5.7
    • Component/s: Core
    • Labels:
      None

      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.

        Activity

        Hide
        nblair Nicholas Blair added a comment -

        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.

        Show
        nblair Nicholas Blair added a comment - 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.
        Hide
        nblair Nicholas Blair added a comment -

        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.

        Show
        nblair Nicholas Blair added a comment - 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.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing old issues

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing old issues

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            nblair Nicholas Blair
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: