2 Replies Latest reply on Jan 21, 2013 5:10 AM by jrantav

    Web service / saaj-impl / xerces parser issues

    jrantav Novice

      We're using spring-ws 2.1.0, and have strange issue with it with latest JBoss AS7 snapshot.

       

      When enabling request validation with

       

      <bean class="org.springframework.ws.soap.server.endpoint.interceptor.PayloadValidatingInterceptor">

             <property name="xsdSchemaCollection" ref="schemaCollection"/>

             <property name="validateRequest" value="true"/>

             <property name="validateResponse" value="true"/>

      </bean>

       

      We get error

       

      <spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">cvc-complex-type.3.2.2: Attribute 'id' is not allowed to appear in element 'xsd:GetOwnerRequest'.</spring-ws:ValidationError>

      <spring-ws:ValidationError xmlns:spring-ws="http://springframework.org/spring-ws">cvc-complex-type.4: Attribute 'id' must appear on element 'xsd:GetOwnerRequest'.</spring-ws:ValidationError>

       

      which makes no sense - the same attribute cannot both exist and be absent. The reason I think this is a JBoss issue is that if I specify this in the pom:

       

      <dependency>

          <groupId>com.sun.xml.messaging.saaj</groupId>

          <artifactId>saaj-impl</artifactId>

          <version>1.3.20</version>

          <scope>runtime</scope>

      </dependency>

      <dependency>

          <groupId>com.sun.xml.parsers</groupId>

          <artifactId>jaxp-ri</artifactId>

          <version>1.4.5</version>

          <scope>runtime</scope>

      </dependency>

       

      everything starts to miraculously work. However, if I do that, everything works on cold deployment, e.g. after rebooting the server - if I hotdeploy the very same .war, I start getting the exception

       

      com.sun.org.apache.xerces.internal.parsers.XIncludeAwareParserConfiguration cannot be cast to com.sun.org.apache.xerces.internal.xni.parser.XMLParserConfiguration

       

      on every request, signaling some kind of class loader issue on hotdeployment.

       

      Any ideas?