You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2008/12/05 05:40:44 UTC
[jira] Commented: (AXIS2-4166) MIN_VALUEs for byte, short, int and
long are used in corresponding wrapper classes to indicate null values.
The nillable attribute should be used to indicate null values
[ https://issues.apache.org/jira/browse/AXIS2-4166?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12653625#action_12653625 ]
Amila Chinthaka Suriarachchi commented on AXIS2-4166:
-----------------------------------------------------
use -Euwc option. this generates Byte class instead of byte where you can use min value.
> MIN_VALUEs for byte, short, int and long are used in corresponding wrapper classes to indicate null values. The nillable attribute should be used to indicate null values
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AXIS2-4166
> URL: https://issues.apache.org/jira/browse/AXIS2-4166
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.4.1, 1.3
> Reporter: Heinz Pferschy
>
> The MIN_VALUEs for byte, short, int and long are used in corresponding wrapper classes to indicate null values. Therefore it is not possible to transport these MIN_VALUEs via SOAP.
> E.g. It is not possible to use the value -128 for a byte
> Example:
> -------------
> If the type in WSDL is defined as
> <xsd:simpleType name="LongValue">
> <xsd:restriction base="xsd:long"></xsd:restriction>
> </xsd:simpleType>
> the following modification of the generated source is necessary to allow serialization of Long.MIN_VALUE
> //Heinz Pferschy: bug fix to allow Long.MIN_VALUE
> // if (localLongValue==java.lang.Long.MIN_VALUE) {
> //
> // throw new org.apache.axis2.databinding.ADBException ("property value cannot be null!!");
> //
> // }
> // else {
> xmlWriter.writeCharacters (org.apache.axis2.databinding.utils.ConverterUtil.convertToString (localLongValue) );
> // }
> This bug is related to AXIS2-1272.
> The provided fix shouldn't use MIN_VALUEs for null values. The nillable attribute should be used to indicate null values
--
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org