[SWS-517] Soap response validation errors after update to 1.5.7 Created: 22/May/09  Updated: 04/May/12  Resolved: 13/Aug/09

Status: Closed
Project: Spring Web Services
Component/s: OXM, XML
Affects Version/s: 1.5.7
Fix Version/s: 1.5.8

Type: Bug Priority: Major
Reporter: Jacques Couzteau Assignee: Arjen Poutsma
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 1d 2h 5m
Original Estimate: Not Specified
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,


Attachments: XML File GMK-Response.xml     XML File GetMetaDataKeysResonse.xml     XML File codexws.xsd    
Reference URL: http://forum.springsource.org/showthread.php?p=242464#post242464

 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.



 Comments   
Comment by Jacques Couzteau [ 22/May/09 ]

Full response.

Comment by Arjen Poutsma [ 03/Aug/09 ]

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...

Comment by Jacques Couzteau [ 06/Aug/09 ]

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

Comment by Jacques Couzteau [ 06/Aug/09 ]

schema added (not the wsdl).

Comment by Arjen Poutsma [ 12/Aug/09 ]

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...

Comment by Jacques Couzteau [ 13/Aug/09 ]

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.

Comment by Jacques Couzteau [ 13/Aug/09 ]

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

Comment by Jacques Couzteau [ 13/Aug/09 ]

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.

Comment by Jacques Couzteau [ 13/Aug/09 ]

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.

Comment by Arjen Poutsma [ 13/Aug/09 ]

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.

Comment by Arjen Poutsma [ 13/Aug/09 ]

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

Comment by Jacques Couzteau [ 14/Aug/09 ]

verified fix with latest 1.5.8 Snapshot. (Yay!)

Thank you! much appreciated.

Comment by Arjen Poutsma [ 04/May/12 ]

Closing old issues

Generated at Sun Dec 17 17:52:38 UTC 2017 using JIRA 6.4.14#64029-sha1:ae256fe0fbb912241490ff1cecfb323ea0905ca5.