axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mai Sun (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-3279) Axis2-1.3: BeanUtil: wrong xsi:type handling
Date Tue, 22 Jan 2008 08:44:34 GMT

    [ https://issues.apache.org/jira/browse/AXIS2-3279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561260#action_12561260
] 

Mai Sun commented on AXIS2-3279:
--------------------------------

Hi Deepal:

I tried to make some modification to BeanUtil which works fine for me:

	//objectAttributes.add(new QName("type"));
	//objectAttributes.add(beanObject.getClass().getName());
	objectAttributes.add(new QName(Constants.XSI_NAMESPACE, "type",
					 "xsi"));
	QName type = new QName(elemntNameSpace.getNamespaceURI(),beanObject.getClass().getSimpleName());
	objectAttributes.add(type);


Hope it helps.

Regards,
Mai Sun

> Axis2-1.3: BeanUtil: wrong xsi:type handling
> --------------------------------------------
>
>                 Key: AXIS2-3279
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3279
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.3
>            Reporter: Jabber W
>            Assignee: Deepal Jayasinghe
>             Fix For: 1.3
>
>
> In  the deserialize(Class beanClass,
>                                   OMElement beanElement, 
>                                   ObjectSupplier objectSupplier, 
>                                   String arrayLocalName)
> 1.  there is a bug in the xsi:type hadnling (line 295) :
>           String instanceTypeName = beanElement.getAttributeValue(new QName("type"))
>                        -- which returns null when attribute supplied instead of  --
>           String instanceTypeName  = 
>                beanElement.getAttributeValue(QName.valueOf("{http://www.w3.org/2001/XMLSchema-instance}type"))
> As a result the supplied xsi:type is missed.  
> BUT !!
> 2.  Though the attribute value was collected properly it's still buggish :
>    the assumption that the xsi:type contains the java name is not justified (line 298):

>               beanClass = Loader.loadClass(beanClass.getClassLoader(), instanceTypeName)

> The xsi:type of course may be translated to appropriate class, but it shoudn't be the
same.
> All mentioned is highly important issue when the extender types are used.

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


Mime
View raw message