This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAXB VALIDATION

 
Andy Smith
Ranch Hand
Posts: 239
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the concept of validation in JAXB ?
Can anyone plz explain in detail
 
Tong Chen
Ranch Hand
Posts: 1011
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Find it out from JavaWSTutorial:
"Unmarshal Validate Example" on page 426
and "Validate-On-Demand Example" on page 428.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vlaidation means the input XML file is validated against its schema i.e. the structure and constraints defined in the schema are followed in the XML instance.
 
Ian McDermid
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A more detailed explaination is:

JAXB Objects are created from XSD's. When you create an object, when you create the XML from that object, the resultant XML will be validated against the XSD
 
Chris Lexington
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know how much of this is news to you, but here goes.

Unmarshalling means moving XML to and an object tree, Marshalling means the reverse. In JAXB, there is an Unmarshaller object and a Marshaller object. The Unmarshaller does validation, the marshaller does not. There is also a way to perform validation anytime you want (programmatically), but I have never used that feature.
 
Mikalai Zaikin
Ranch Hand
Posts: 3368
11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.boot.by/wsd-guide/ch05s03.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic