Hi,
I have an issue with binding and class inheritance based on an internal
element of XML schema. I have the following classes:
----------------------------------------------------------
public class Profile {
protected UniqueId profileId;
}
public class Traveller extends Profile {
protected TravellerName name;
....
}
public class Company extends Profile {
protected CompanyName name;
....
}
------------------------------------------------------------
and XML messages like that:
1) <Profile>
<UniqueId type="1" />
<TravellerName>Davide</TravellerName>
</Profile>
2) <Profile>
<UniqueId type="1" />
<CompanyName>IBM</ComapnyName>
</Profile>
So I want to use only instances of Traveller and Company depending if in XML
inside the <Profile> i have <TravellerName> or <CompanyName>.
I've tried with abstract classes and "extends" but there isn't a solution
because when JibX have to bind the <Profile> it doesn't know the inside
element and the correct
instance depend on that element.
I'have spent many time on this problem and so I would know if it's me that
haven't found the right solution or in fact in Jibx simply I can't do
that... anyone have any suggestions?
Thanks
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