Description
Maxim Butov opened SWS-1078 and commented
When using StrictPayloadValidatingInterceptor with validateRequest = true and request has errors, we get an incorrect error message:
org.springframework.ws.client.support.interceptor.WebServiceValidationException: XML validation error on response: cvc-complex-type.2.4.a: Invalid content was found starting with element 'channel'. One of '{username, customerCategory}' is expected.
at org.springframework.ws.client.support.interceptor.AbstractValidatingInterceptor.handleRequestValidationErrors(AbstractValidatingInterceptor.java:203)
at org.springframework.ws.client.support.interceptor.AbstractValidatingInterceptor.handleRequest(AbstractValidatingInterceptor.java:179)
at org.springframework.ws.client.core.WebServiceTemplate.doSendAndReceive(WebServiceTemplate.java:597)
which refers to response, while the error is in the request.
The "response" is hardcoded in AbstractValidatingInterceptor#handleRequest as well as WebServiceValidationException#createMessage.
Affects: 3.0.7