commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sash <>
Subject betwixt list xml to bean problem, please help
Date Wed, 30 May 2007 22:22:37 GMT

I've been using betwixt for a couple of days, really new to this library.
Anyway, using the sample provided on the site, have been able to write
simple beans to xml and then back again.  However, when I tried to use a
bean that had a List of other beans, I got a weird result.  The xml is
created properly, but when I try to create the bean from xml, an empty
object array is created of correct length but with null values.  If the list
contained only one element, then everythign works correctly.  What am I
doing wrong or what am I not doing.  Tried with betwixt 0.6 to 0.8.   Thank
you in advance for your comments!

<?xml version="1.0" encoding="UTF-8"?>
        <productName>??  </productName>
        <activeDate>Mon Mar 26 22:10:00 EST 2007</activeDate>
        <lastModifiedDate>Wed May 23 14:36:31 EDT 2007</lastModifiedDate>
        <productName>12 Monkeys - P200159</productName>
        <activeDate>Wed Apr 25 15:52:31 EDT 2007</activeDate>
        <lastModifiedDate>Fri Apr 27 10:42:34 EDT 2007</lastModifiedDate>

CatalogTO class
public class CatalogTO implements Serializable {
 private List productTOs = new ArrayList();
 public List getProductTOs() {
  return productTOs;
 public void addProductTO(ProductTO productTO) {
 public void setProductTOs(List productTOs) {
  this.productTOs = productTOs;

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message