Issue Type: Bug Bug
Affects Versions: JiBX 1.2.4
Assignee: Unassigned
Attachments: JiBXInheritance.zip
Components: core
Created: 08/Aug/12 12:51 PM
Description:

I have created one Java project with few POJO classes using inheritance relationship. Have defined jibx binding definition within the project itself. Created one more Java project with an additional POJO class, which uses class in earlier project, wherein reference is maintained through base class. On marshalling, xml string only captures information of base class.

However, if everything is compiled under one definition, everything works fine.

I have included one sample. On unzipping, you will find three projects, JiBXDemo, JiBXDemo-Base, JiBXDemo-Extend. Under JiBXDemo-Base there are Person, Teacher and Student classes, where the latter two extends first one. It also has simple class City. Inside JiBXDemo-Extend I have one class Group which has reference to City and Person. JiBXDemo helps to run this example with class GroupDemo. Here, an object of Group is created where object of Student is assigned to Person's reference. Later on, this group object is marshalled.

Each of this project has its own build.xml file. Order in which they should be run is JiBXDemo-Base, then JiBXDemo-Extend followed by JiBXDemo. Thereafter go inside JiBXDemo project and run following commond:
java -classpath bin:lib/jibx-run.jar:../JiBXDemo-Base/bin:../JiBXDemo-Extend/bin GroupDemo
It will create one Group.xml file, which will have xml mapping for Person, which should actually been of Student.

Environment: Fedora-16, 64 bit, Java 1.6
Project: JiBX
Priority: Major Major
Reporter: Rajeev Gajbhiye
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to