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 "Balaji Hari (JIRA)" <ji...@apache.org> on 2008/10/29 15:33:44 UTC

[jira] Commented: (AXIS2-3651) BeanUtil class should try and fill the xsi:type attribute with value from type table before defaulting to class name

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

Balaji Hari commented on AXIS2-3651:
------------------------------------

Where can I get this fix? This has been a blocker issue. Is this integrated in 1.4.1 release?

> BeanUtil class should try and fill the xsi:type attribute with value from type table before defaulting to class name
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-3651
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3651
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: databinding
>    Affects Versions: 1.4, 1.3
>         Environment: Windows XP SP2, Java 6
>            Reporter: Aaron Gourley
>            Assignee: nadir amra
>            Priority: Minor
>             Fix For: nightly
>
>
> Using the type table to fill the xsi:type attribute would help make it possible to successfully validate SOAP response messages against the WSDL.  Although the class name approach may be sufficient for POJO services, it provides meaningless information when other approaches are used.
> I suggest replacing the following lines of BeanUtil.java
>              // Added objectAttributes as a fix for issues AXIS2-2055 and AXIS2-1899 to 
>             // support polymorphism in POJO approach.
>             // For some reason, using QName(Constants.XSI_NAMESPACE, "type", "xsi") does not generate
>             // an xsi:type attribtue properly for inner objects. So just using a simple QName("type").
>             ArrayList objectAttributes = new ArrayList();
>             objectAttributes.add(new QName("type"));
>             objectAttributes.add(beanObject.getClass().getName());
> With this (or similar ... not sure if qualified check should be there):
>             ArrayList objectAttributes = new ArrayList();
>             objectAttributes.add(new QName(Constants.XSI_NAMESPACE, "type", "xsi"));
>             if( typeTable != null && qualified )
>             {
>                 QName qNamefortheType =
>                     typeTable.getQNamefortheType(beanObject.getClass().getName());
>                 if (qNamefortheType == null) {
>                     // Added objectAttributes as a fix for issues AXIS2-2055 and AXIS2-1899 to 
>                     // support polymorphism in POJO approach.
>                     objectAttributes.add(beanObject.getClass().getName());
>                 }
>                 else
>                 {
>                     objectAttributes.add(qNamefortheType);    
>                 }
>             }
>             else
>             {
>                 objectAttributes.add(beanObject.getClass().getName());
>             }
> Note that I had no issues with generating the xsi:type attribute for inner elements in my testing (as was mentioned by the existing comment).

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


Re: [jira] Commented: (AXIS2-3651) BeanUtil class should try and fill the xsi:type attribute with value from type table before defaulting to class name

Posted by Nadir Amra <am...@us.ibm.com>.
It is marked as resolved and is in revision 652990....it should be in 
1.4.1 since it was fixed in 02/May/08.  All this information is in the 
issue.  Next time please examine the issue before posting comment. 

Nadir Amra


"Balaji Hari (JIRA)" <ji...@apache.org> wrote on 10/29/2008 09:33:44 AM:

> 
> Balaji Hari commented on AXIS2-3651:
> ------------------------------------
> 
> Where can I get this fix? This has been a blocker issue. Is this 
> integrated in 1.4.1 release?
> 
> > BeanUtil class should try and fill the xsi:type attribute with 
> value from type table before defaulting to class name
> > 
> 
--------------------------------------------------------------------------------------------------------------------
> >
> >                 Key: AXIS2-3651
> >                 URL: https://issues.apache.org/jira/browse/AXIS2-3651
> >             Project: Axis 2.0 (Axis2)
> >          Issue Type: Improvement
> >          Components: databinding
> >    Affects Versions: 1.4, 1.3
> >         Environment: Windows XP SP2, Java 6
> >            Reporter: Aaron Gourley
> >            Assignee: nadir amra
> >            Priority: Minor
> >             Fix For: nightly
> >
> >


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org