java ee - JAXB update the XML file -
i'm using jaxb generate xml file on server. after first time deployed server. want change tag names of xml file. changed class variables. recompiled java files , redeploy. however, xml not change @ all. need steps update xml file?
by default jaxb (jsr-222) implemntations base xml element names based on public properties (get/set methods) , public fields (instance variables). if fields not public changing there name not impact xml tags.
if want base element names on fields can use @xmlaccessortypr(xmlaccesstype.field)
annotation:
also can use @xmlelement
on property change name.
Comments
Post a Comment