Prevent JAXB from creating JAXBElements

I had some annoying trouble with updating JAXB1.0 code into JAXB2.0 code, among which the one of the things is the generation og JAXBElements instead normal type, like JAXBElements instead of simple double.
This is due to fact that JAXB wants to define cases of elements in XSD with minOccurs="0" and nillable="true". If you don't care about such issue, then you can prevent JAXB from creating the JAXBElements in a following way:

Add to your command line generation -b addCFG.xjb
where addCFG.xjb is this file:
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
jaxb:version="2.0">



source:

Comments

Popular posts from this blog

Timeline on Latex

Exporting Skype Chat/Skype Contacts to csv file using the shell script and sqlite3 (usually already installed on mac)

trim() not supported by IE7 and IE8