This discussion is archived
3 Replies Latest reply: Jan 25, 2012 3:20 PM by EJP RSS

Unmarshalling does not initialize super class variables

631463 Newbie
Currently Being Moderated
Hi,

I experience a very strange problem while unmarshelling to java object. consider the following example.

public class Base {
private boolean status = false;
private String name = "XXXXXXXX";

}

public class Derived extends Base{
//some fields and methods
}

When we unmarshal xml to Derived object then Base class variable should be initialized to default if its values is not supplied into xml.

Please advice

Thanks

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points