Dear XMLBeans-Users / Developers,
when replacing JAXB with XMLBeans v2 (which seemed like a good idea to
me because of XMLBeans´ Open-Soruce nature and its exteded functionality
over JAXB) i came across the following beahviour not common to JAXB:
When i have a UserDocument that contains a Node of UserType and i get
the reference to this UserType Node and then change its Content the
content of the parent UserDocument´s UserType Node is not changed.
So when i do the following:
UserDocument userDocument = UserDocument.Factory.newInstance();
UserType user = UserType.Factory.newInstance();
userDocument.setUser(user);
user.setEmail("[EMAIL PROTECTED]");
then the userDocument.getUser().getEmail() is null.
When is do the following:
UserDocument userDocument = UserDocument.Factory.newInstance();
UserType user = UserType.Factory.newInstance();
user.setEmail("[EMAIL PROTECTED]");
userDocument.setUser(user);
then the userDocument.getUser().getEmail() is "[EMAIL PROTECTED]"
Also when i do:
UserDocument userDocument = UserDocument.Factory.newInstance();
UserType user = UserType.Factory.newInstance();
userDocument.setUser(user);
userDocument.getUser().setEmail("[EMAIL PROTECTED]");
then the userDocument.getUser().getEmail() is "[EMAIL PROTECTED]"
Is this Behaviour documented? Is it ok? The sad thing is it leads the
pontential for a lot of errors that are not obvious from complier errors
etc. Also i wanted to change code now working with JAXB to XMLBeans
which is then not possible without painful errors showing up throughout
the application.
Is there some kind of possibility to compile JAXB classes that don´t
behave like this?
thanks for your help!
cheers
roman seidl
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]