【发布时间】:2015-06-12 02:12:13
【问题描述】:
当我使用axis2 环境验证WSDL 中的整数字段时,我收到以下错误。这适用于 xml bean。但是我收到了 xjc beans 对象的错误。 XSD 验证失败!!!当我传递空值时出现此错误。
请帮我解决这个问题。
<xsd:element minOccurs="0" name="TypeName" type="types:PrincipalVariantType"/>
<xsd:simpleType name="PrincipalVariantType">
<xsd:restriction base="xsd:integer">
<xsd:enumeration value="1" />
<xsd:enumeration value="2" />
<xsd:enumeration value="3" />
<xsd:enumeration value="4" />
</xsd:restriction>
</xsd:simpleType>
堆栈跟踪
【问题讨论】:
-
-
[java.lang.NumberFormatException: 零长度 BigInteger] 看起来像是输入错误的情况
-
我收到这个错误,当我通过空。但我的要求是,它会抛出错误,比如只允许值 1、2、3、4。
标签: xml xsd xml-parsing xsd-validation xjc