如果我在我的 WSDL 中指定一个参数是 xsd:int 类型,那么该参数的最大值和最小值是多少?它取决于实现 Web 服务的技术?我正在使用 Java,所以我是否受到 Java 中的 int 类型的限制,或者 Web 服务库 (Axis) 是否应该处理它?</p>
最佳答案
是的,32 位。来自 Eric van der Vlist's RelaxNG datatype reference :
<xsd:simpleType name="int" id="int">
<xsd:restriction base="xsd:long">
<xsd:minInclusive value="-2147483648"/>
<xsd:maxInclusive value="2147483647"/>
</xsd:restriction>
</xsd:simpleType>
此外,来自 W3C XML Schema Recommendation, Part 2 :
int is derived from long by setting the value of maxInclusive to be 2147483647 and minInclusive to be -2147483648
关于java - int 在 SOAP Web 服务中是否有最大值和最小值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1429048/