Is there a way to specify in external binding that the member variable names in generated classes should follow the same letter case (and not the java conventions), on a schema level (i.e. not a globalbinding)?
I am having elements named as XYZProperty in the schema, which should have corresponding member variable named as XYZProperty itself and not xyzProperty. I tried adding the following in the binding file, but it didn't work:
<jxb:bindings node="//xsd:complexType[@name='SomeType']/xsd:sequence/xsd:element[@name='XYZProperty']">
<jxb:property name="XYZProperty"/>
</jxb:bindings>
where //xsd:complexType[@name='SomeType']/xsd:sequence/xsd:element[@name='XYZProperty'] is the xpath to the element in the schema.
OpenJDK implementation of xjc uses
com.sun.xml.internal.bind.api.impl.NameConverter#toVariableName
to convert property name to member variable name. It seems that there is no implementation that can leave variable name 'as is'. If it is applicable you can write your own xjc plugin, that will set private property name to its public name. Plugin may be like this: