I have the following generated enumeration type. The issue I have is that for some reason (presumably capitalisation) that an underscore is inserted in the NCBonus value.
I would like to know how I can prevent that from happening when generating the enumeration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="PromoType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="MEM"/>
* <enumeration value="COU"/>
* <enumeration value="CHA"/>
* <enumeration value="SAD"/>
* <enumeration value="NCBonus"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "PromoType")
@XmlEnum
public enum PromoType {
MEM("MEM"),
COU("COU"),
CHA("CHA"),
SAD("SAD"),
@XmlEnumValue("NCBonus")
NC_BONUS("NCBonus");
I have tried using the global bindings option
<jxb:globalBindings underscoreBinding="asCharInWord" xmlns:xs="http://www.w3.org/2001/XMLSchema">
which has undesired consequences on other objects but makes no different to the enum type.
In addition I have tried using
<jaxb:bindings schemaLocation="../schemas/insurance_service_model.xsd" node="//xs:schema">
<jaxb:bindings node="xs:simpleType[@name='PromoType']">
<jaxb:typesafeEnumMember name="NCBonus" value="NCBonus"/>
all to no avail.
Could someone please advise how I can achieve this goal please.