Trying to de-serialized the following XML, where "day" & "fulldob" are
objects types with their individual converters for custom logic. Once
De-serialized & when toXML method is applied to the object, the values for
"day" & "fulldob" are missing. Meaning, day & fulldob are not getting
de-serialized properly. Seems like XStream is not liking these two be broken
into their own Objects and/or with their individual converters.
********** input XML *******
<primarydob>
<month>05</month>
<day>13</day>
<year>1982</year>
<fulldob>19820513</fulldob>
</primarydob>
**** XML from Object (after de-serializing the above XML) *Missing values!!*
*******
<primarydob>
<month>05</month>
* <day/>*
<year>1982</year>
* <fulldob/>*
</primarydob>
***** Here's the object for "primarydob" ***********
@XStreamAlias("dob")
public class DOBData {
@XStreamAlias("month")
private String month;
@XStreamAlias("day")
private *DOBDay* dobDay = new DOBDay();
@XStreamAlias("year")
private String year;
@XStreamAlias("fulldob")
private *FullDOB *fulldob = new FullDOB();
getters/setters
}
******** Here's the object for "fulldob" ***********
@XStreamAlias("fulldobdata")
@XStreamConverter(FullDOBDayMaskingConverter.class)
public class FullDOB {
@XStreamAlias("fulldob")
private String fullDOB;
public String getFullDOB() {
return fullDOB;
}
public void setFullDOB(String fullDOB) {
this.fullDOB = fullDOB;
}
}
********** Here's the object for "day" ***********
@XStreamAlias("dobday")
@XStreamConverter(DOBDayMaskingConverter.class)
public class DOBDay {
@XStreamAlias("day")
private String day;
public String getDay() {
return day;
}
public void setDay(String day) {
this.day = day;
}
}
Can someone please help?
Thanks,
--
View this message in context:
http://xstream.10960.n7.nabble.com/xstream-deserialization-issue-tp8381.html
Sent from the Developer mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email