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 "Johannes Dietrich (JIRA)" <ji...@apache.org> on 2009/08/26 16:28:59 UTC

[jira] Created: (AXIS2-4476) Support of xsi:nil="false"

Support of xsi:nil="false"
--------------------------

                 Key: AXIS2-4476
                 URL: https://issues.apache.org/jira/browse/AXIS2-4476
             Project: Axis 2.0 (Axis2)
          Issue Type: Improvement
          Components: adb
    Affects Versions: 1.4.1
            Reporter: Johannes Dietrich


Our backend system sends <type xsi:nil="false">10</type> when the attribute is defined in the wsdl as  nillable="true". Without a custom fixing with the following code (in org.apache.axis2.databinding.utils.BeanUtil.deserialize(Class, OMElement, ObjectSupplier, String)), null would be returned.

Object partObj;
boolean isNil = false;
if (attribute != null) {
	String nilValue = attribute.getAttributeValue();
	if("true".equals(nilValue) || "1".equals(nilValue)){
		isNil = true;
	}
}
if (isNil) {
    partObj = null;
} else {
    if (SimpleTypeMapper.isSimpleType(parameters)) {


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AXIS2-4476) Support of xsi:nil="false"

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi resolved AXIS2-4476.
-------------------------------------------------

    Resolution: Fixed

Apply the change to current trunk[1]. Please send us a patch when you send improvements.


[1] http://svn.apache.org/viewvc?view=rev&revision=808279

> Support of xsi:nil="false"
> --------------------------
>
>                 Key: AXIS2-4476
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4476
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: adb
>    Affects Versions: 1.4.1
>            Reporter: Johannes Dietrich
>   Original Estimate: 0.25h
>  Remaining Estimate: 0.25h
>
> Our backend system sends <type xsi:nil="false">10</type> when the attribute is defined in the wsdl as  nillable="true". Without a custom fixing with the following code (in org.apache.axis2.databinding.utils.BeanUtil.deserialize(Class, OMElement, ObjectSupplier, String)), null would be returned.
> Object partObj;
> boolean isNil = false;
> if (attribute != null) {
> 	String nilValue = attribute.getAttributeValue();
> 	if("true".equals(nilValue) || "1".equals(nilValue)){
> 		isNil = true;
> 	}
> }
> if (isNil) {
>     partObj = null;
> } else {
>     if (SimpleTypeMapper.isSimpleType(parameters)) {

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.