Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In v 2.1.0, dispatch method of MessageDispatcher does not call processEndpointException method if response schema validation fails [SWS-824] #792

Closed
gregturn opened this issue Feb 5, 2013 · 0 comments
Assignees
Milestone

Comments

@gregturn
Copy link
Contributor

gregturn commented Feb 5, 2013

Subhajit Raha opened SWS-824 and commented

I have upgraded spring web service library from 2.0 to 2.1 in my application. But after that overriden customizeFault method of ServiceFaultExceptionResolver class (which extends SimpleSoapExceptionResolver of Spring) does not get invoked from dispatch method of MessageDispatcherServllet class if exception is thrown from overriden handleResponseValidationErrors method of PayloadValidatingInterceptorWithException class (Which extends PayloadValidatingInterceptor of Spring).

Now this works fine if I use v 2.0. But in v2.1, If exception is thrown from overriden handleResponseValidationErrors then control is coming to the second catch block of dispatch method which does not call processEndpointException. And processEndpointException is responsible to call all the fault resolver. second catch block is below:

catch (Exception ex) {
			// Trigger after-completion for thrown exception.
            triggerAfterCompletion(mappedEndpoint, interceptorIndex, messageContext, ex);
            throw ex;
        }

If exception is thrown from overriden handleRequestValidationErrors method of PayloadValidatingInterceptorWithException ( which extends PayloadValidatingInterceptor of Spring) then control comes to the first catch block(Please see below) of dispatch method and that calls processEndpointException - So everything is fine for request schema validation fail scenario

catch (Exception ex) {
                Object endpoint = mappedEndpoint != null ? mappedEndpoint.getEndpoint() : null;
                processEndpointException(messageContext, endpoint, ex);
            }  

But In v 2.0 there is only one catch block in dispatch method for all the code and that catch block calls processEndpointException - So both request and response schema validation scenario works fine with v2.0.

So change of exception handling in dispatch method of v2.1 is breaking my application.


Affects: 2.1.2

Reference URL: http://forum.springsource.org/showthread.php?134305-FaultResolver-not-get-called-if-Response-schema-validation-fails-in-spring-ws-2-1-0

Issue Links:

Referenced from: commits 3a09d29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants