• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

JAXB VALIDATION

 
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
 
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.
 
Ranch Hand
Posts: 8943
Firefox Browser Spring Java
  • 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.
 
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
 
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.
 
Rancher
Posts: 3599
38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
http://java.boot.by/wsd-guide/ch05s03.html
 
Been there. Done that. Went back for more. But this time, I took this tiny ad with me:
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic