This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Issue in JAXB Boolean Parsing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Issue in JAXB Boolean Parsing" Watch "Issue in JAXB Boolean Parsing" New topic

Issue in JAXB Boolean Parsing

Remya sri

Joined: Feb 03, 2012
Posts: 3
JAXB is accepting the value "truce" and return boolean value "true".How this is happening?How does Jaxb Convert boolean Values?

Is this an issue or this is how the conversion happens.

Please have the code fragment written for testing

forgive me for my naming conventions

Below are the XSD and XML

My output is "true"
g tsuji
Ranch Hand

Joined: Jan 18, 2011
Posts: 618
[1] I bet you have never get it to the stage of validating anything at all. And what you observe has nothing to do with the schema. It has everything to do with your class com.pack1.SampleDTO where there is a method isHasNext() returning a boolean. That's all. xsd data typing has no bearing on the problem not to say conversion of anything. You can put truce, ecurt, true or anything there and the result would be the same.

[2] In the case of further development to the stage of validating, suffice it to mention that the schema (xsd) is invalid? It can never get pass the loading stage. What is the problem? I leave it to your own discovering.
It is sorta covered in the JavaRanch Style Guide.
subject: Issue in JAXB Boolean Parsing
It's not a secret anymore!