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

Wrong error message on request validation.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.7
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            mbutov Maxim Butov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: