Working on a large integration project where we are also doing validation on some of the data which we are integrating back and forth.
We are using the CXF-XJC-plugin to generate java classes from XSD and WSDL files. It would be very keen to have restrictions added as part of the generated classes, rather than having plain POJO classes.
An example would be:
<xsd:element name="someString" minOccurs="0">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="12"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
Currently create as:
String someString;
Basic setter and getter and the fancy fluent api, but nowhere is any restriction logic about the 12 characters
Anyone would know how to generate with restrictions built in?