Title: Problem while unmarshalling

Hi,

A) I am only using a mapping file for marshalling and unmarshalling "sans descriptors" since its supposedly quite straightforward and I dont have many XML schema constraints to specify in the descriptors anyway.

It works all fine for marshalling but the unmarshalling doesnt work at all.

unmarshaller = new Unmarshaller(pMapping);
listeLue = (TcmMdlListeAExporter)unmarshaller.unmarshal(new InputSource(new FileReader(file)));

My "listeLue" variable which is an ArrayList is always empty after execution of this statement. Maybe I should unmarshall another way…

Thanks in advance

<mapping>
   <class name="tcm.mdl.TcmMdlListeAExporter" auto-complete="false">
      <map-to xml="TCM"/>
      <field name="_listeComptes" type="tcm.mdl.TcmMdlCompte" collection="arraylist" get-method="getListeComptes" set-method="setListeComptes">

         <bind-xml name="Compte" node="element"/>
      </field>
      <field name="_listePersonnes" type="tcm.mdl.TcmMdlPersonne" collection="arraylist" get-method="getListePersonnes" set-method="setListePersonnes">

         <bind-xml name="Personne" node="element"/>
      </field>
   </class>
   <class name="tcm.mdl.TcmMdlCompte" auto-complete="false">
      <map-to xml="Compte"/>
      <field name="_refPersonne" type="string" get-method="getRefPersonne" set-method="setRefPersonne">
         <bind-xml name="ReferencePersonne" node="element"/>
      </field>
      <field name="_typeImpot" type="string" get-method="getTypeImpot" set-method="setTypeImpot">
         <bind-xml name="TypeImpot" node="element"/>
      </field>
      <field name="_anneeFiscale" type="string" get-method="getAnneeFiscale" set-method="setAnneeFiscale">
         <bind-xml name="AnneeFiscale" node="element"/>
      </field>
      <field name="_numeroOrdre" type="string" get-method="getNumeroOrdre" set-method="setNumeroOrdre">
         <bind-xml name="NumeroOrdre" node="element"/>
      </field>
   </class>
   <class name="tcm.mdl.TcmMdlPersonne" auto-complete="false">
      <map-to xml="Personne"/>
      <field name="_referencePersonne" type="string" get-method="getReferencePersonne" set-method="setReferencePersonne">

         <bind-xml name="ReferencePersonne" node="element"/>
      </field>
   </class>
</mapping>



Reply via email to