Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JAXB Inserting Underscores

910697Jan 12 2012 — edited Jan 13 2012
Hi Everyone,

I am using jaxws to generate JAXB objects for an enumeration and am having an issue with it inserting extra underscores into the generated code and was wondering if anyone knew how to prevent this from happening. Specifically, I have an enum defined like this:
<simpleType name ="DataWidthEnum">
  <restriction base="string">
    <enumeration value="A8_BIT_DATA_BUS"/>
    <enumeration value="A16_BIT_DATA_BUS"/>
  </restriction>
</simpleType>
but my generated enum class has attributes like this:
  @XmlEnumValue("A8_BIT_DATA_BUS")
  A_8_BIT_DATA_BUS("A8_BIT_DATA_BUS"),
  @XmlEnumValue("A16_BIT_DATA_BUS")
  A_16_BIT_DATA_BUS("A16_BIT_DATA_BUS")
Is it possible to stop the underscore insertion happening between the A and 8 or A and 16?

Thanks in advance for any help!

Edited by: user3989028 on Jan 12, 2012 11:16 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 10 2012
Added on Jan 12 2012
4 comments
2,425 views