Is JAXB Bug? please help me
- by wd-shuang
I take a scheme,its element definition as follow:
I use xjb to export java file,xjb as follow:
Java as:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OriginalMessageContents1", propOrder = {
"anyOne",
"anyTwo"
})
public class OriginalMessageContents1 {
@XmlAnyElement
protected Element anyOne;
@XmlAnyElement
protected Element anyTwo;
public Element getAnyOne() {
return anyOne;
}
public void setAnyOne(Element value) {
this.anyOne = value;
}
public Element getAnyTwo() {
return anyTwo;
}
public void setAnyTwo(Element value) {
this.anyTwo = value;
}
When I unmashaller this object by using getAnyOne,I got the second element content;I got null by using getAnyTwo.
It is a bug?
Anybody can help me ?
thanks all.