Ignoring the reflection problem aside, is there any solution to
marshalling a flat object into an array-list?
public class Flat{
private string a;
private boolean b;
//getters and setters
}
<flat>
<attribute>valA</attribute>
<attribute>valB</attribute>
</flat>
Thanks,
Sairam.
________________________________
From: Samavedam, Sairam
Sent: Wednesday, January 03, 2007 4:24 PM
To: '[email protected]'
Subject: tricky marshalling problem
Hi folks. Here is my java file and the required marshalled xml output.
public class Flat{
private string a;
private boolean b;
//getters and setters
}
<flat>
<attribute type="string">valA</attribute>
<attribute type="boolean">valB</attribute>
</flat>
The way I am doing it now is to convert Flat object into an arraylist of
"Attribute" objects using reflections API. (Attribute object has type
and value). Then I am marshalling it.
Is there any easier way to do this?
Thanks,
Sairam.