The problem occurs only with generated class and mapping With manual mapping, for example this file, it works ! I use this file with generated data container classes.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapping SYSTEM "http://castor.exolab.org/mapping.dtd"> <mapping> <description>test de mapping pour le test group</description> <class name="com.pictet.apps.intranet.tests.castor.TestGroupUser" auto-complete="true"> <map-to xml="TestGroupUser"/> <field name="testgroup"><bind-xml name="testgroup" node ="element"/></field> <field name="teststring"><bind-xml name="teststring" node ="element"/></field> </class> <class name="com.pictet.apps.intranet.tests.castor.Testgroup" auto-complete="true"> <field name="customerref"> <bind-xml name="customerref" node="element"/> </field> <field name="customerid"> <bind-xml name="customerid" node="element"/> </field> </class> </mapping> using the code : mapping.loadMapping( "D:\\castor\\mapping.xml" ); Unmarshaller unmar = new Unmarshaller(mapping); TestGroupUser document = (TestGroupUser)unmar.unmarshal(new InputSource(new FileReader("D:\\castor\\testgroup.xml"))); System.out.println("id : "+document.getTestgroup().getCustomerid()); System.out.println("ref : "+document.getTestgroup().getCustomerref()); System.out.println("teststring : "+document.getTeststring()); ---------------------------------------------------------------- This document should only be read by those persons to whom it is addressed and is not intended to be relied upon by any person without subsequent written confirmation of its contents. If you have received this e-mail message in error, please destroy it and delete it from your computer. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and/or publication of this E-mail message is strictly prohibited. ---------------------------------------------------------------- Pictet & Cie, Banquiers Tel. +41 (0)58 323 2323 29, boulevard Georges-Favon Fax +41 (0)58 323 2324 CH-1204 GENEVE http://www.pictet.com/ ---------------------------------------------------------------- * NEW PHONE NUMBERS AS OF 1/1/2002! * * NOUVEAUX NUMEROS DES LE 1/1/2002! * ---------------------------------------------------------------- ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
