views:

131

answers:

2

If I specify a parameter in my WSDL is of type xsd:int, what is the max and min values for that parameter? It is dependant on the technology the web service is implemented in? I am using Java, so am I constrained by the int type in Java or should the web service library (Axis) be handling that?

+8  A: 

Yes, 32 bits. From 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>

Additionally, from the 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

Jon Skeet
Beat by the Skeet...only 29 seconds, though....and we had the same link...
Thomas Owens
I'm considering leaving my post, though, because I quote text and not XML...:)
Thomas Owens
The more the merrier. I'm glad I've found a bit more of a definitive source than the book though :)
Jon Skeet
+2  A: 

According to this page, xsd:int is:

...is the set of common single-size integers (32 bits), the integers between -2147483648 and 2147483647.

Thomas Owens