int Web在SOAP Web服务中是否具有最大值和最小值?

Ton*_*ger 5 java web-services

如果我在WSDL中指定的参数是xsd:int类型,那么该参数的最大值和最小值是多少?它取决于Web服务实现的技术?我正在使用Java,所以我受Java中的int类型约束,或者Web服务库(Axis)是否应该处理它?

Jon*_*eet 12

是的,32位.来自Eric van der Vlist的RelaxNG数据类型参考:

<xsd:simpleType name="int" id="int">
 <xsd:restriction base="xsd:long">
 <xsd:minInclusive value="-2147483648"/>
 <xsd:maxInclusive value="2147483647"/>
 </xsd:restriction>
</xsd:simpleType>
Run Code Online (Sandbox Code Playgroud)

另外,从W3C XML Schema Recommendation,第2部分:

通过将maxInclusive的值设置为2147483647并将minInclusive设置为-2147483648,从long派生int