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

Soap response validation errors after update to 1.5.7

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5.7
    • Fix Version/s: 1.5.8
    • Component/s: OXM, XML
    • Labels:
      None
    • Environment:
      Mac OSX 10.5.6, Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_16-b06-284), JBoss 4.2.2GA, Spring 2.5.6, hibernate 3.3.1GA, Maven version: 2.0.9,

      Description

      Upgrade from SpringWS 1.5.6 to 1.5.7 and update. - No code changes.
      After upgrade error "java.lang.ArrayIndexOutOfBoundsException: -1" was thrown during validation. Turning validation off works as a workaround.

      my Soap API has 130 calls. Most respones were working fine, not all were tested. I wonder if It might have something to do with the size of the response, all other tested responses were pretty small, see forum post for bean configurations, errors and response sample.

      1. codexws.xsd
        121 kB
        Jacques Couzteau
      2. GetMetaDataKeysResonse.xml
        10 kB
        Jacques Couzteau
      3. GMK-Response.xml
        22 kB
        Jacques Couzteau

        Activity

        couzteau Jacques Couzteau created issue -
        Hide
        couzteau Jacques Couzteau added a comment -

        Full response.

        Show
        couzteau Jacques Couzteau added a comment - Full response.
        couzteau Jacques Couzteau made changes -
        Field Original Value New Value
        Attachment GetMetaDataKeysResonse.xml [ 15407 ]
        arjen.poutsma Arjen Poutsma made changes -
        Fix Version/s 1.5.8 [ 11236 ]
        arjen.poutsma Arjen Poutsma made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I tried to reproduce this locally, but it works for me.

        Could you try a recent snapshot (http://static.springsource.org/spring-ws/sites/1.5/downloads/snapshots.html) and see if this still occurs?

        If it does, please attach your XSD schema. I cannot reproduce it fully without the schema...

        Show
        arjen.poutsma Arjen Poutsma added a comment - I tried to reproduce this locally, but it works for me. Could you try a recent snapshot ( http://static.springsource.org/spring-ws/sites/1.5/downloads/snapshots.html ) and see if this still occurs? If it does, please attach your XSD schema. I cannot reproduce it fully without the schema...
        Hide
        couzteau Jacques Couzteau added a comment -

        Thanks Arjen - I did try with the latest snapshot and can still reprom, attaching wsdl

        Show
        couzteau Jacques Couzteau added a comment - Thanks Arjen - I did try with the latest snapshot and can still reprom, attaching wsdl
        couzteau Jacques Couzteau made changes -
        Attachment codexws.xsd [ 15594 ]
        Hide
        couzteau Jacques Couzteau added a comment -

        schema added (not the wsdl).

        Show
        couzteau Jacques Couzteau added a comment - schema added (not the wsdl).
        arjen.poutsma Arjen Poutsma logged work - 12/Aug/09 10:27 PM
        • Time Spent:
          3h 58m
           
          <No comment>
        arjen.poutsma Arjen Poutsma made changes -
        Time Spent 3h 58m [ 14280 ]
        Remaining Estimate 0d [ 0 ]
        arjen.poutsma Arjen Poutsma logged work - 12/Aug/09 10:54 PM
        • Time Spent:
          5h
           
          <No comment>
        arjen.poutsma Arjen Poutsma made changes -
        Time Spent 3h 58m [ 14280 ] 1d 58m [ 32280 ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Thanks for the schema. Even with that, I still can't reproduce it: the GetMetaDataKeysResonse.xml you attached validates fine. See the method testAxiom in

        https://fisheye.springsource.org/browse/spring-ws/trunk/core/src/test/java/org/springframework/ws/soap/server/endpoint/interceptor/PayloadValidatingInterceptorTest.java?r=1435

        DId you replace both the XML and the Core module with snapshots? I did some fixes to the XML module which are related...

        Show
        arjen.poutsma Arjen Poutsma added a comment - Thanks for the schema. Even with that, I still can't reproduce it: the GetMetaDataKeysResonse.xml you attached validates fine. See the method testAxiom in https://fisheye.springsource.org/browse/spring-ws/trunk/core/src/test/java/org/springframework/ws/soap/server/endpoint/interceptor/PayloadValidatingInterceptorTest.java?r=1435 DId you replace both the XML and the Core module with snapshots? I did some fixes to the XML module which are related...
        Hide
        couzteau Jacques Couzteau added a comment -

        yes, I used the 1.5.8-SNAPSHOT for all of the following maven artefacts:
        spring-xml,
        spring-ws-core,
        spring-ws-core-tiger,
        spring-oxm,
        spring-oxm-tiger,
        spring-ws-security.

        Show
        couzteau Jacques Couzteau added a comment - yes, I used the 1.5.8-SNAPSHOT for all of the following maven artefacts: spring-xml, spring-ws-core, spring-ws-core-tiger, spring-oxm, spring-oxm-tiger, spring-ws-security.
        Hide
        couzteau Jacques Couzteau added a comment -

        Here is the full response that I logged using Spring-WS 1.5.6 - The previous response was shortened.

        Show
        couzteau Jacques Couzteau added a comment - Here is the full response that I logged using Spring-WS 1.5.6 - The previous response was shortened.
        couzteau Jacques Couzteau made changes -
        Attachment GMK-Response.xml [ 15609 ]
        Hide
        couzteau Jacques Couzteau added a comment -

        Tried again - just to make sure - still seeing ArrayIndexOutOfBoundsException: -1 in

        at com.sun.org.apache.xerces.internal.util.NamespaceSupport.popContext(NamespaceSupport.java:184)
        at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.endPrefixMapping(ValidatorHandlerImpl.java:373)
        at org.springframework.xml.stream.StaxStreamXmlReader.handleEndElement(StaxStreamXmlReader.java:186)
        at org.springframework.xml.stream.StaxStreamXmlReader.parseInternal(StaxStreamXmlReader.java:85)
        at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:128)
        at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:111)
        at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.process(ValidatorImpl.java:192)
        at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:147)
        .....

        I assume that in PayloadValidatingInterceptorTest you can set
        private static final String VALID_MESSAGE = "GMK-Response.xml";
        to my attached response and then run testAxiom();

        Which should repro the problem unless my app is still doing something else - I'd be happy to give you more info - but I don't know what to look for.

        Show
        couzteau Jacques Couzteau added a comment - Tried again - just to make sure - still seeing ArrayIndexOutOfBoundsException: -1 in at com.sun.org.apache.xerces.internal.util.NamespaceSupport.popContext(NamespaceSupport.java:184) at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorHandlerImpl.endPrefixMapping(ValidatorHandlerImpl.java:373) at org.springframework.xml.stream.StaxStreamXmlReader.handleEndElement(StaxStreamXmlReader.java:186) at org.springframework.xml.stream.StaxStreamXmlReader.parseInternal(StaxStreamXmlReader.java:85) at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:128) at org.springframework.xml.stream.AbstractStaxXmlReader.parse(AbstractStaxXmlReader.java:111) at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.process(ValidatorImpl.java:192) at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:147) ..... I assume that in PayloadValidatingInterceptorTest you can set private static final String VALID_MESSAGE = "GMK-Response.xml"; to my attached response and then run testAxiom(); Which should repro the problem unless my app is still doing something else - I'd be happy to give you more info - but I don't know what to look for.
        Hide
        couzteau Jacques Couzteau added a comment -

        FYi: I have run my test suite against the app that uses the 1.5.8-SNAPSHOT of spring web services. There are no other calls that have this problem.

        Show
        couzteau Jacques Couzteau added a comment - FYi: I have run my test suite against the app that uses the 1.5.8-SNAPSHOT of spring web services. There are no other calls that have this problem.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I can finally reproduce it. It seems to be related to Xerces in the JDK: the test runs fine when using JDK 1.6, but under 1.5, it fails.

        As a workaround, you can try upgrading to a recent version of Xerces (thus overriding the com.sun.org.apache.xerces that's built in the JDK).

        I will also investigate further, and see if I can fix this.

        Show
        arjen.poutsma Arjen Poutsma added a comment - I can finally reproduce it. It seems to be related to Xerces in the JDK: the test runs fine when using JDK 1.6, but under 1.5, it fails. As a workaround, you can try upgrading to a recent version of Xerces (thus overriding the com.sun.org.apache.xerces that's built in the JDK). I will also investigate further, and see if I can fix this.
        arjen.poutsma Arjen Poutsma logged work - 13/Aug/09 9:50 PM
        • Time Spent:
          1h 7m
           
          <No comment>
        arjen.poutsma Arjen Poutsma made changes -
        Time Spent 1d 58m [ 32280 ] 1d 2h 5m [ 36300 ]
        arjen.poutsma Arjen Poutsma made changes -
        Resolution Fixed [ 1 ]
        Status In Progress [ 3 ] Resolved [ 5 ]
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        I think I've fixed it. Can you try a recent snapshot (as of tonight) and try again?

        Show
        arjen.poutsma Arjen Poutsma added a comment - I think I've fixed it. Can you try a recent snapshot (as of tonight) and try again?
        Hide
        couzteau Jacques Couzteau added a comment -

        verified fix with latest 1.5.8 Snapshot. (Yay!)

        Thank you! much appreciated.

        Show
        couzteau Jacques Couzteau added a comment - verified fix with latest 1.5.8 Snapshot. (Yay!) Thank you! much appreciated.
        Hide
        arjen.poutsma Arjen Poutsma added a comment -

        Closing old issues

        Show
        arjen.poutsma Arjen Poutsma added a comment - Closing old issues
        arjen.poutsma Arjen Poutsma made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        73d 9h 26m 1 Arjen Poutsma 03/Aug/09 7:41 PM
        In Progress In Progress Resolved Resolved
        10d 2h 11m 1 Arjen Poutsma 13/Aug/09 9:52 PM
        Resolved Resolved Closed Closed
        994d 9h 10m 1 Arjen Poutsma 04/May/12 7:03 AM

          People

          • Assignee:
            arjen.poutsma Arjen Poutsma
            Reporter:
            couzteau Jacques Couzteau
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0d
              0d
              Logged:
              Time Spent - 1d 2h 5m
              1d 2h 5m