PDA

View Full Version : Unable to validate xml with Jaxb2Marshaller



routis
May 4th, 2006, 05:10 AM
In a previous post (http://forum.springframework.org/showthread.php?t=24083), I reported a "bug" in jaxb unmarshaller.
Poutsma corrected the problem by introducing two new class Jaxb1Marshaller and Jaxb2Marshaller.

After Poutsma made available the nightly source (http://forum.springframework.org/showthread.php?t=24586) code I came up with the following problem:

I want to unmarshall an xml that depends to an xml schema that in turn includes other xml schemas, using Jaxb2Marshaller

Since the method setSchema(Resource) of Jaxb2Marshaller takes only one argument (the resource to the xml schema), I am not able to validate the XML. (Outside spring-oxm I can do it like this (http://javaton.blogspot.com/2006/04/jaxb-2-validate-against-xml-schema.html)).

I would like to propose the addition of an overloaded setSchema method that accepts either a list (or array) of Resources, or a Schema object.

Arjen Poutsma
May 4th, 2006, 08:57 AM
Ok, I will fix this, probably this weekend.

Could you file a JIRA issue for it here (http://opensource.atlassian.com/projects/spring/browse/SWS)?

Thanks,

routis
May 4th, 2006, 09:12 AM
Could you file a JIRA issue for it here (http://opensource.atlassian.com/projects/spring/browse/SWS)?
I 've created SWS-23 (http://opensource.atlassian.com/projects/spring/browse/SWS-23)

Arjen Poutsma
May 6th, 2006, 03:50 AM
I 've created SWS-23 (http://opensource.atlassian.com/projects/spring/browse/SWS-23)

It's fixed: I've added a schemas property to the Jaxb2Marshaller. You can download a new snapshot here (http://static.springframework.org/spring-ws/snapshots/spring-ws-20060506.zip).

routis
May 6th, 2006, 06:24 AM
It's fixed: I've added a schemas property to the Jaxb2Marshaller. You can download a new snapshot here (http://static.springframework.org/spring-ws/snapshots/spring-ws-20060506.zip).

Thanks for the fix. Propably, I 'll check it on Monday.

Keep up the good work.

By the way, are there any news about moving to SVN and/or Maven? The situation with SF is not acceptable.

routis
May 10th, 2006, 01:59 AM
I would like to report that the fix works just fine.

Arjen Poutsma
May 10th, 2006, 02:36 PM
I would like to report that the fix works just fine.

Great.

Since SourceForge CVS is down again, I could do very little to fix it at this time. ;)