java - jaxb doesn't generate enums with base integer -
i have following xsd:
<xs:simpletype name="resultcode"> <xs:restriction base="xs:integer"> <xs:enumeration value="0" id="approved_no_error"> <xs:annotation> <xs:appinfo> <jxb:typesafeenummember name="approved_no_error"/> </xs:appinfo> </xs:annotation> </xs:enumeration> jax-b nothing, no errors, no warnings doesn't generate class. if change base xs:integer xs:string it's ok. need integer values.
i generate classes maven:
<groupid>org.codehaus.mojo</groupid> <artifactid>jaxb2-maven-plugin</artifactid> <version>1.3</version> <executions> <execution> <id>authgateway</id> <goals> <goal>xjc</goal> </goals> and question 2. jax-b , ide (idea) doesn't allow whitespaces in id attrribute. why?
<xs:enumeration value="0" id="approved_no_error"> - ok
<xs:enumeration value="0" id="approved no error"> - not ok
is correct behaviour?
you can use external binding file behaviour looking for:
Comments
Post a Comment