Hi,

I am evaluating jibx and i would like to know if there is a way to achieve this behaviour :

class A {
  B b;
  ...
}
class B {
  String id;
  ...
}



with the input/output files :

   * in a.xml :

<a>
 <b>someBid</b>
</a>

   * in b.xml :

<b>
 <id>someBid</id>
</b>



I tried with this:

   * in b.jibx.xml :

<binding>
   <mapping name="b" class="B">
       <value name="id" field="id" style="attribute" ident="def" />
   </mapping>
</binding>

   * in a.jibx.xml :

<binding>
   <include path="b.jibx.xml" />
   <mapping name="a" class="A">
       <value name="b" field="b" ident="ref" />
   </mapping>
</binding>



The marshalling works fine but not the unmarshalling, which was expected... Is there a "clean" way to achieve this kind of behaviour (apart defining a field "String bId" in A, unmarshalling A then B, then setting b in A) ?

Thanks

David
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to