metro-jax-ws
metro-jax-ws copied to clipboard
wsimport generating enum types incorrectly with extra underscores
I am using wsimport to generate a Java client API from my WSDL file and have experienced an error with enum type generation.
I have WSDL as follows:
<xs:simpleType name="type"> <xs:restriction base="xs:string"> <xs:enumeration value="BLAH_99X"/> <xs:enumeration value="BLAH_123"/> <xs:enumeration value="BLAH_ABC"/> <xs:enumeration value="BLAH_T1A32BCS12"/> </xs:restriction> </xs:simpleType>
The applicable portion of the generated Java code from wsimport is: @XmlType(name = "type") @XmlEnum public enum Type { @XmlEnumValue("BLAH_99X") BLAH_99_X("BLAH_99X"), BLAH_123("BLAH_123"), BLAH_ABC("BLAH_ABC"), @XmlEnumValue("BLAH_T1A32BCS12") BLAH_T_1_A_32_BCS_12("BLAH_T1A32BCS12"); }
It seems that anytime a letter and a number are side-by-side an underscore is being inserted between them.
Environment
Java 1.7 / Windows
Affected Versions
[2.2.7]
Source: https://github.com/javaee/metro-jax-ws/issues/1084 Author: glassfishrobot