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 "Heinz Pferschy (JIRA)" <ji...@apache.org> on 2008/12/04 15:47:44 UTC
[jira] Created: (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
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.3, 1.4.1
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 -127 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
[jira] Updated: (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
Posted by "Heinz Pferschy (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-4166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Heinz Pferschy updated AXIS2-4166:
----------------------------------
Description:
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
was:
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 -127 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
> 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
[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
Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
[ 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