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

Allow SoapFaultMappingExceptionResolver to use strategy to obtain SoapFaultDefinition

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0 M3
    • Fix Version/s: 1.0 RC1
    • Component/s: Core
    • Labels:
      None

      Description

      I would like to use something @SoapFault on the exception class to generate the SoapFaultDefinition. But SoapFaultMappingExceptionResolver.getFaultDefinition is private, and hence I pretty much need to reimplement that entire class.

      Maybe another level of abstract class with a concrete class subclass that does what SoapFaultMappingExceptionResolver now. Or a strategy interface to which SoapFaultMappingExceptionResolver delegates, with a default strategy that again does what SoapFaultMappingExceptionResolver now.

      I would prefer the latter because when I obtain the annotation from the exception I want to be able to use the MessageSource and resolve parameter placeholders from the string contained in the annotation.

        Activity

        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I like this idea (@SoapFault), and I think will implement something similar before 1.0. It fits nicely with the @Endpoint and other annotations.

        Show
        arjen.poutsma Arjen Poutsma added a comment - I like this idea (@SoapFault), and I think will implement something similar before 1.0. It fits nicely with the @Endpoint and other annotations.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Done, and documented.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Done, and documented.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        In the end, I decided not to go for a strategy interface, because that increases the amount of configuration. I've made an AbstractSoapFaultDefinitionExceptionResolver, with a getFaultDefinition() template method, and also a customizeFault() method.

        Show
        arjen.poutsma Arjen Poutsma added a comment - In the end, I decided not to go for a strategy interface, because that increases the amount of configuration. I've made an AbstractSoapFaultDefinitionExceptionResolver, with a getFaultDefinition() template method, and also a customizeFault() method.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing RC1 issues.

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing RC1 issues.
        Hide
        memelet Barry Kaplan added a comment -

        Very nice.

        Show
        memelet Barry Kaplan added a comment - Very nice.

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            memelet Barry Kaplan
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: