Hi Yuval :) You need to use either factory or create-type for B and map the data in A as a structure with no type. That would enable JiBX to use runtime information to determine which type the data is.
Ran Biron Software Developer +972.3.5399.848 office | +972.508.257720 mobile | ran.bi...@hp.com<mailto:ran.bi...@hp.com> 19 Shabazi Street | Yehud | Israel 56100 www.hp.com/go/software<http://www.hp.com/go/software> [cid:image001.jpg@01CA0B74.0593E1D0]<http://www.hp.com/go/software> [cid:image002.png@01CA0B74.0593E1D0]Please consider your environmental responsibility before printing this e-mail or any attachments. Recycle where possible. Thanks! From: Carmel, Yuval Sent: Wednesday, July 22, 2009 10:15 PM To: jibx-users@lists.sourceforge.net Subject: [jibx-users] Mapping generics class Hello, I am having issues mapping a generics class with JibX. For example, I have defined the following 2 classes: Class A<T>{ T t; T getData(){ return t;} ... } Class B{ ... } How would I go to map the "data" field in A<B> (data is of type B)? When I am trying to map object A with structure B for "data" field, I am getting an error that it can't assign instance of type B to java.lang.Object. Thanks, Yuval
<<inline: image001.jpg>>
<<inline: image002.png>>
------------------------------------------------------------------------------
_______________________________________________ jibx-users mailing list jibx-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jibx-users