Hi all,

I've read in the archive that it's possible to define multiple <mapping> for
the same class with different element names *if* the direction of binding is
*only* input.
I've tried but there are errors and I think it's impossible....

I have for example this class

CompanyName {
     String name;
     String code;
}

and I want to bind this class to 2 different elements: <CompanyName> and
<AgencyName> (only the element name change)

----------  XML -----------------
.......
<CompanyName name="IBMC" code="1" />
<AgencyName name="IBMA" code="2">
......
----------------------------------

so the binding with *global mapping*:

-------------- BINDING   -------------------------------
<binding direction="input">

<!-- COMPANY NAME -->
<mapping name="CompanyName" class="test.CompanyName">
   <value name="name" field="name"  style="attribute" />
   <value name="code" filed="code" style="attribute" />
</mapping>

<!-- AGENCY NAME -->
<mapping name="AgencyName" class="test.CompanyName">
   <value name="name" field="name"  style="attribute" />
   <value name="code" filed="code" style="attribute" />
</mapping>

</binding
----------------------------------------------------------------

So It's correct that also with direction binding to input is impossible to
define multiple mappings for the same class with different elements names??

Thank you

Davide.
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to