【发布时间】:2013-12-04 16:14:11
【问题描述】:
我的 XML 架构中有以下内容:
<xsd:simpleType name="DECIMAL_TYPE">
<xsd:restriction base="xsd:double">
<xsd:minInclusive value="-100000"/>
<xsd:maxInclusive value="100000"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="ANGLE_VALUE_TYPE">
<xsd:restriction base="DECIMAL_TYPE">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="360"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="ANGLE_TYPE">
<xsd:simpleContent>
<xsd:extension base="ANGLE_VALUE_TYPE">
<xsd:attribute name="UNITS" type="xsd:string" fixed="degrees"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:complexType name="SPECIAL_ANGLE_TYPE">
<xsd:simpleContent>
<xsd:restriction base="ANGLE_TYPE">
<xsd:maxInclusive value="90" /> <!-- The source of the problem -->
</xsd:restriction>
</xsd:simpleContent>
</xsd:complexType>
此架构用于 WSDL,我将其用作新 SoapUI 项目的基础。但是,当我尝试导入项目时,SoapUI 会出现此错误:
- 您尝试导入的 WSDL 有问题:
- 来源:空
- 错误:必须小于或等于之前的 maxInclusive
如果我将问题行中的“90”更改为“360”,则会出现相同的错误。
如果我删除带有注释的行(“问题的根源”),那么 SoapUI 会很好地导入 WSDL。该模式在 Eclipse 中成功验证,并且 WSDL2Java 在其上运行良好。
我的架构有什么问题(如果有的话),我需要做什么才能将其导入 SoapUI?谢谢!
【问题讨论】:
-
您能否提供一个重现错误的示例 WSDL?