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 2007/03/29 12:51:28 UTC

[jira] Resolved: (AXIS2-2373) Axis2 ADB generated classes do neither interpret nor validate booleans according to XML schema definition

     [ https://issues.apache.org/jira/browse/AXIS2-2373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi resolved AXIS2-2373.
-------------------------------------------------

    Resolution: Fixed

fixed the issue with revision 523667.

> Axis2 ADB generated classes do neither interpret nor validate booleans according to XML schema definition
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-2373
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2373
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.1.1
>         Environment: Axis2, version 1.1.1. 
> Tomcat 5.0
> JDK1.6.0
>            Reporter: Jonas Boëthius
>
> Axis2 ADB generated classes do neither interpret nor validate booleans according to XML schema definition.
> This bug consists of two parts, whereas the interpretation part is the most sever:
> -A boolean value '1' is not interpreted as true after parsing a SOAP request (or response). 
> -Any boolean value is accepted without validation error
> The XML schema defines boolean accordingly: an instance of a datatype that is defined as boolean• can have the following legal literals {true, false, 1, 0}. Representing booleans with numbers 0 and 1 is quite common in some frameworks.
> When generating Axis2 classes using the ADB data binding, the generated classes uses the org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean method to parse booleans. The implementation of this method is simply Java's interpretation of what is a Boolean (where the Boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string "true"):
> public static boolean convertToBoolean(String s) {
>         return Boolean.valueOf(s).booleanValue();
>     }
> For the interpretation part, "true" and "1" should return true.
> For validation part, all values but (case sensitive) 'true', 'false', '0' and '1' should generate some kind of fault (at least not be silently accepted).

-- 
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