[ 
https://issues.apache.org/jira/browse/AXIS2-1899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12488129
 ] 

Sathija Pavuluri commented on AXIS2-1899:
-----------------------------------------

Deepal,

Is this being supported, now that version 1.2 is (almost) out.  It would be 
great if POJO approach supports inheritence too.

> BeanUtil.getOMElement is not working with object hierarchy
> ----------------------------------------------------------
>
>                 Key: AXIS2-1899
>                 URL: https://issues.apache.org/jira/browse/AXIS2-1899
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.1
>            Reporter: pinston
>         Assigned To: Deepal Jayasinghe
>
> Test OK:
> ------------
> public class MyObject {
>     private String prop;
>  
>     public void setProp(String prop) {
>         this.prop = prop;
>     }
>  
>     public String getProp() {
>         return this.prop;
>     }
> }
> MyObject myObject = new MyObject();
> myObject.setProp( "test" );
> OMElement omElement = BeanUtil.getOMElement(createEmployeeMethod, new 
> Object[] {myObject}, null, false, null);
> => xml: <arg0 xmlns=""><prop>test</prop></arg0>
> Test Failed :
> ----------------
> public class ExtObject extends MyObject {
> }
> ExtObject myObject = new ExtObject ();
> myObject.setProp( "test" );
> OMElement omElement = BeanUtil.getOMElement(createEmployeeMethod, new 
> Object[] {myObject}, null, false, null);
> generated xml: <arg0 xmlns="" />
> Why
> ------
> I think the correction is in the method BeanUtil.getPullParser in line 83
> JProperty properties [] = jClass.getDeclaredProperties(); should be replaced 
> by JProperty properties [] = jClass.getProperties();
> with this correction everything works fine

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to