What change I have to make in xsd to generate the desired JAXB class.
I m using maven to generate the JAXB classes.
posted 3 years ago
protected String xyz;
That looks more likely an annotation by hand in object to xml mapping or an annotation generated via any other schema compilation (I have no idea which) tools other than via xjc bundled in the jaxb2 package. By its own, the meaning in practice would be quite the same. I could imagine one would have a hard time in fact to product that exact annotation without name = 'xyz' via xjc.
In any case, you can experiment with an external customisation file to re-iterate the should-be default naming... according the javebean property name.
But that seems a priori quite unnecessary, though.