users@jaxb.java.net

problem in enum generated from simple type

From: Rochak Gupta <rochak005_at_gmail.com>
Date: Mon, 10 May 2010 15:53:20 +0530

Hi Team,



We are upgrading from jaxb1 and jaxb2 . So we are facing a problem that:



While generating an enum class from respective simpletype element we are
getting enum clases with underscores for example



Problematic simpletype:



<xs:simpleType name="MessageNameType">

            <xs:restriction base="xs:string">

                  <xs:enumeration value="submitGraniteCmplRequest"/>

                  <xs:enumeration value="submitGraniteCmplResponse"/>

                  <xs:enumeration value="reserveNambisIPRequest"/>

                  <xs:enumeration value="releaseNambisIPRequest"/>

                  <xs:enumeration value="notifyNambisIPResponse"/>

                  <xs:enumeration value="getCmiSubscription"/>

                  <xs:enumeration value="cmiSubscriptionDetails"/>

                  <xs:enumeration value="cancelCmiInterception"/>

                  <xs:enumeration value="completeCmiInterception"/>

                  <xs:enumeration value="pingCmi"/>

                  <xs:enumeration value="pingCmiResult"/>

            </xs:restriction>

      </xs:simpleType>



Now in Jaxb1 we were getting enum class as submitGraniteCmplRequest now we
are getting submit_GraniteCmpl_Request , ie difference of underscores . and
thus breaking our code . Is there any way,that same enum class can be
generated ie. without underscores..?? . I am attaching my xsd’ herewith

Thanks and regards,

Rochak