Hi,

I have a class like -

class PlaceInfo {

Address homeAddress;

Address officeAddress;

}

I serialize the xml as -

<address type="home"></address>
<address type="office"></address>

Basically I made a 'AddressConverter' class extending JavaBeanConverter with
adding the 'type' attribute in the 'marshal' function.  

When I try to 'unmarshal' this xml, the 'AbstractReflectionConverter' kicks
in and raises 'ConversionException' saying that it can't find 'address'
field in the 'PlaceInfo' class.  I can see why it is trying to do this.

How do I tell the 'unmarshal' function to look for 'homeAddress' or
'officeAddress' using the xstream configuration? I can make an 'Address'
object in the 'unmarshal' function and return it but it still gives the same
error.

Thank you,
Sriram
-- 
View this message in context: 
http://old.nabble.com/Deserializing-multiple-fields-of-same-type-tp33150949p33150949.html
Sent from the xstream - user mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to