This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JaxB(How to create source with Accesstype.PROPERTY)

 
Kanchan Kumar Dey
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

when I used Jaxb with xsd to generate java source it creates the same but with AccessType.Field on the type classes. The problem is while marshalling it enquires the fields but not the getter methods. This way I will not get a default value If I don't set it explicitly.

Is there a way to use JAXB to generate source with AccessType.Property(this will also place all the field level generated annotation at the property level) instead of AccessType.Field.

Thanks in advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic