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

标签 java web-services

如果我在我的 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/

相关文章:

java - 从 char 解析 Float

Java 使用 hibernate

java - 如何确定最后一次通话是在android中拨出还是拨入

java - 如何在 Java SE 环境中部署 JAX-RS 应用程序?

c# - 是否可以在不重新部署的情况下添加对网站的 asmx Web 服务的引用?

java - Ejb全局事务管理

java - Hikari 内存中 HSQL 连接池

wcf - 在WCF Web服务的WSDL中提供不同的端点地址

java - android中的IP回退

java - "A WebService annotation is not present"异常