You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
PayloadValidatingInterceptorTest looks odd as the tests that seem to be for testing invalid request have invalid response in the expected error message.
snicoll
changed the title
Wrong error message on request validation. [SWS-1078]
Client-side validation logs an invalid request as the response being invalid [SWS-1078]
Apr 16, 2025
Maxim Butov opened SWS-1078 and commented
When using StrictPayloadValidatingInterceptor with validateRequest = true and request has errors, we get an incorrect error message:
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
The text was updated successfully, but these errors were encountered: