Hi folks,
I am generating my WSDL from java using ?wsdl in the browser for my web
service. I am using Axis2 1.4 and running on Tomcat 5.5.26.
I have a single class as a parameter for one of the methods of the
webservice. One of the variables in that class is of the type below.
@XmlType(name = "DataEncodingType")
@XmlEnum
public enum DataEncodingType {
RAW("RAW"),
HEX("HEX"),
@XmlEnumValue("BASE64")
BASE_64("BASE64");
private final String value;
DataEncodingType(String v) {
value = v;
}
public String value() {
return value;
}
public static DataEncodingType fromValue(String v) {
for (DataEncodingType c: DataEncodingType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
As you can see, this is a JAXB generated emum class.
But when I generate the WSDL, the complex type that represents this
class, looks like this:
<xs:complexType name="DataEncodingType">
<xs:complexContent>
<xs:extension base="xs:Enum">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
This is not correct as i am expecting to see the enum values represented
in the class above, present in the complexType.
Can somebody please let me know how to fix this? This used to work a
while back, but for some reason, this isn't working anymore.
Hope to hear from you
~Glen