I have for example a WSDL definition construct like this:
<xsd:simpleType name="MyDayType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Sat"/>
<xsd:enumeration value="Wed"/>
</xsd:restriction>
</xsd:simpleType>
And then you have some other object with for example:
<xsd:complexType name="MyEntity">
<xsd:sequence>
<xsd:element name="dayType" type="v:MyDayType" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
Now if I use the cxf-codegen-plugin, it will generate an enum "MyDayType" and references it in the "MyEntity" class. Usually this is exactly what you want.
However in my case I cannot use the enum as I am restricted in the way the generated Java code is used later on. So I would like that CXF generate strings instead of enums. So it simply maps all occurrence of this type in other objects to a string. In my example instead of:
public class MyEntity {
protected List<MyEntity> dayType;
/** Getters(/Setters) **/
}
I would like to have:
public class MyEntity {
protected List<String> dayType;
/** Getters(/Setters) **/
}
How can I achieve this? I would rather prefer some way of doing that without writing my own custom jaxb plugin.