5
枚举我有以下的xsd:JAXB不会产生与基地整数
<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少了点什么,没有错误,没有警告只是不生成该类。如果将基地从xs:integer
改为xs:string
那么就没关系。但我需要整数值。
我生成类与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>
而且问题2. JAX-B和IDE(IDEA)不允许在ID attrribute空格。为什么?
<xs:enumeration value="0" id="Approved_no_error">
- 确定
<xs:enumeration value="0" id="Approved no error">
- 也不行
它是正确的行为?
该死。 'code'( XS:注释> 'code' XS:注释> )'代码' –
如何在评论中使用标签 –
好文档为目的:https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Fuse/6.0/html/Developing_Applications_Using_JAX-WS/files/JAXWSCustomTypeMappingEnum.html –