Hi,
I've searched the archives and haven't found a similar posting so here's the
question...
I have a flat (1 level of depth) XML message coming in that needs to be
unmarshalled to a class that contains multiple other classes. Of course,
only being 1 level deep the incoming XML has no concept of anything more
then 1 class. For example:
Incoming XML:
<MsgA>
<Data1>1</Data1>
<Data2>2</Data2>
<Data3>3</Data3>
<Data4>4</Data4>
<Data5>5</Data5>
</MsgA>
Classes to be mapped to:
public class MsgA {
private int data2;
private SubMsg1 sub1;
private SubMsg2 sub2;
private SubMsg3 sub3;
}
public class SubMsg1 {
private int data1;
private int data5;
}
public class SubMsg2 {
private int data3;
}
public class SubMsg3 {
private int data4;
}
We would like the resulting objects to look like this once that XML is
unmarshalled:
MsgA
data2 = 2
SubMsg1.data1 = 1;
SubMsg1.data5 = 5;
SubMsg2.data3 = 3;
SubMsg3.data4 = 4;
Is it possible to go from a flat message like that to a multiple layer
object?
Thanks,
Scott
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev