Hi,
I've a problem in inheritance between classes.
I use a little example for explain a situation very similar to mine.
I'm quite newbie in jaxb and I'm trying to insert it in a preexistent
project...it is very structurated..and
so I've encountered some problems...
public abstract class AbstractMessage implements .... {
protected AbstractHeader header; <---------------- HOW
TO DEFINE?!
@XmlElementWrapper(name = InformationsList")
protected List<Information> informations = new
ArrayList<Information>();
@XmlElement(name="Summary")
protected MsgSummary summary;
}
------------- Headers ----------------
public abstract class AbstractHeader {
...
..
.
}
public class MsgHeader1 extends AbstractHeader {
...
..
.
}
public class MsgHeader2 extends AbstractHeader {
...
..
.
}
------------- Messages ----------------
public class Message1 extends AbstractMessage {
/* Here I'd like to marshall/unmarshall header as MsgHeader1*/
...
..
.
}
public class Message2 extends AbstractMessage {
/* Here I'd like to marshall/unmarshall header as MsgHeader2*/
...
..
.
}
Can you Help me?
Thanks in advance.
Daniele Bellandi