[ 
http://issues.apache.org/jira/browse/AXISCPP-780?page=comments#action_12317966 
] 

Chinthana Danapala commented on AXISCPP-780:
--------------------------------------------

Hi  Manohar,

I also observe this and for -1 request I get as bellow. 

<?xml version='1.0' encoding='utf-8' ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
<SOAP-ENV:Body>
<ns1:AsNonNillableElementRequest 
xmlns:ns1="http://xsd_negativeInteger.test.apache.org";>
<nonNillableElement>-18446744073709551615</nonNillableElement>
</ns1:AsNonNillableElementRequest>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

This should be able to serialize negative values. As it described this should 
contain only negative values. Its work fine for non negative values, when 
serialize it put the minus sing '-' before the number. But when its negative 
number its unable to serialize minus sign.

> Serialize/Deserialize problem with XSD_negativeInteger type
> -----------------------------------------------------------
>
>          Key: AXISCPP-780
>          URL: http://issues.apache.org/jira/browse/AXISCPP-780
>      Project: Axis-C++
>         Type: Bug
>     Reporter: Manohar

>
> Hi,
> When the maxInclusive value  (which is "-1") for xsd_negativeInteger is given 
>  as an input  it  is serialized/deserialized to some other value and resulted 
> as 18446744073709551615 number .  And the same happens when other negative 
> inputs like -2 or  -3 are given.  The specification says that the ·value 
> space· of negativeInteger is the infinite set {...,-2,-1}. 
> Here is the piece of code which demonstrates the problem. 
>         sprintf(endpoint, "%s", url);
>         XSD_negativeInteger* ws = new XSD_negativeInteger(endpoint);
>         try
>         {
>             result = ws->asNonNillableElement((xsd__negativeInteger)-1);
>             cout << "non-nillable element=" << result << endl;
>         }
>         catch(AxisException& e)
>         {
>             cout << "AxisException : " << e.what() << endl;
>         }
> In the process of serialization/deserialization the minus sign '-' is removed 
> and the value isge chand to 18446744073709551615.  
> I think this not the correct behaviour.  Any  comments ? 
> I will add a test case for this problem soon. 
> Regards
> Manohar

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to