Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does int have a max and min value in a SOAP web service?

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?

like image 448
Tony Eichelberger Avatar asked Sep 15 '09 19:09

Tony Eichelberger


1 Answers

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

like image 148
Jon Skeet Avatar answered Oct 05 '22 15:10

Jon Skeet