maximum value of xsd:unsignedInt cannot exceed maximum value of signed integer
(2147483647)
-------------------------------------------------------------------------------------------
Key: AXIS2C-1492
URL: https://issues.apache.org/jira/browse/AXIS2C-1492
Project: Axis2-C
Issue Type: Bug
Components: code generation
Affects Versions: 1.6.0
Reporter: Maria Indeeva
Deserialize functionality for xsd:unsignedInt values is done via atoi()
function. Here is an example of the generated code for unsignedInt element:
text_value = axiom_element_get_text(current_element, env, current_node);
if(text_value != NULL)
{
status = adb_clientClass_set_priority(_clientClass, env,
atoi(text_value));
}
Here is how that element is defined in XSD file:
<xsd:element name="priority" type="xsd:unsignedInt">
...
</xsd:element
Unfortunately atoi is returning int (signed integer) and as a result whenever
the value for that unsignedInt element is set to be large than the maximum
value for SIGNED integer (larger than 2147483647) it is decreased to
2147483647, while the maximum value for unsignedInt should be 4294967295.
Once the atoi() in generated code is replaced with strtoul() the problem is
gone.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]