BeanUtil.getOMElement is not working with object hierarchy
----------------------------------------------------------
Key: AXIS2-1899
URL: http://issues.apache.org/jira/browse/AXIS2-1899
Project: Apache Axis 2.0 (Axis2)
Issue Type: Bug
Components: databinding
Affects Versions: 1.1
Reporter: pinston
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.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]