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

PayloadValidatingInterceptor cannot handle more than one schema

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.5.4
    • Fix Version/s: None
    • Component/s: XML
    • Labels:
      None
    • Environment:
      Windows XP SP2, Sun JDK 1.5.0_11, Spring 2.5.5, Spring web services 1.5.4

      Description

      A WAR file has two Spring annotated web services (Foo and Bar), each with their own separate XSD files (foo.xsd and bar.xsd) describing request and response streams. Logging and validation interceptors are configured.

      If the PayloadRootAnnotationMethodEndpointMapping does not use the validation interceptor, both web services accept request XML streams from a SOAP UI client and return the correct response XML. This leads me to conclude that the code and configuration for both Foo and Bar services is correct and fully operational.

      If the PayloadRootAnnotationMethodEndpointMapping uses the validation interceptor, which in turn points to a CommonsXsdSchemaCollection instance, the success or failure of the web service depends on the order in which the XSD appears in the CommonsXsdSchemaCollection. If foo.xsd appears first, the Foo service client returns the correct response XML. The Bar service returns a validation error:

      <spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">cvc-elt.1: Cannot find the declaration of element 'pmt:PatternRequest'.</spring-ws:ValidationError>

      If the order of the schemas is reversed in the CommonsXsdSchemaCollection, then the Bar service returns the correct response XML and the Foo service returns the validation error stream.

        Attachments

          Activity

            People

            Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            duffymo Michael Duffy
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: