Sorry i have a mistake in my post
The testing file is this. The problem still exists...

 <ClientData>
  <FirstandLastName>G.F</FirstandLastName>
  <mid>120</mid>
 </ClientData>

And this is the exception:
 When i execute the test code i get the following
 exception: Expected: CarID start tag found: mid
 start tag.

Vasilis wrote:

> Hello all,
> 
> I am using JIBX to unmarshall an XML document. 
> The problem i am facing is this:
> I have created multiple mapping into the same
> binding
> like this:
> 
> <mapping class = "Client" abstract = "true">
>   <stucture name ="FirstandLastName" field="name"/>
> </mapping>
> <mapping name="ClientData" class="carClients"
> extends="Client">
>    <structure map-as="Client"/>
>    <stucture name="CarID">
>    <value name="cid" field="id"/>
>    </structure>
> </mapping>
> <mapping name="ClientData" class="motoClients"
> extends="Client">
>    <structure map-as="Client"/>
>    <structure name="MotoId">
>      <value name="mid" field="id"/>
>    </structure>
> </mapping>
> 
> The testing file i am using is this
> <ClientData>
>  <FirstandLastName>G.F</FirstandLastName>
>  <MotoID>120</MotoID>
> </ClientData>
> 
> 
> When i execute the test code i get the following
> exception: Expected CarID start tag found MotoId
> start
> tag.
> 
> I think this occurs because both two mappings are
> extending the Client class and because they have
> common tags(the ClientData tag) during the
> unmarshalling wrong  mapping class is used. I have
> noticed in the exception window that the class
> "JiBX_Client_bindingcarClients_access.class" is used
> When I reverse the last two mappings in the binding
> the unmarshalling is done succefully.
> 
> How can i make it work?
> 
> 
>       
> 
>       
>               
>
___________________________________________________________
> 
> Χρησιμοποιείτε Yahoo!; 
> Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo!
> Mail 
> διαθέτει την καλύτερη δυνατή προστασία κατά των
> ενοχλητικών 
> μηνυμάτων
> http://login.yahoo.com/config/mail?.intl=gr 
> 
> 



        

        
                
___________________________________________________________ 
Χρησιμοποιείτε Yahoo!; 
Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail 
διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών 
μηνυμάτων http://login.yahoo.com/config/mail?.intl=gr 



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to