Okay, how should the desired XML really look like ? Werner
davecass wrote: > Hi, > > Thanks for replying. > > > Werner Guttmann wrote: >> Sure. Have a look at >> http://castor.org/xml-mapping.html#6.-Location-attribute >> >> to see how you could use the 'location' attribute. >> > > I have tried this, but as both my Classes still map to the same root element > of user, the unmarshaller seems to only use the first one it finds in the > xml mapping file. > > I tried it like this: > > <class name="to.request.PokerCashMoneyToTableRequestTO"> > <map-to xml="user"/> > <field name="amount" type="integer"> > <bind-xml name="amount" node="attribute" location="moneytotable"/> > </field> > </class> > > > <class name="to.request.PokerCashLeaveTableRequestTO"> > <map-to xml="user"/> > <field name="amount" type="integer"> > <bind-xml name="amount" node="attribute" location="moneyfromtable" /> > </field> > </class> > > ....and when i tried to unmarshall PokerCashLeaveTableRequestTO, it still > tries to use the other one and throws ClassCastExceptions. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

