I was attempting to assign annotations of private field members of a class as follows:
@XmlElement(name="mutationType")
@XmlElementWrapper(name="mutationTypes")
private Set<MutationType> mutationTypes = EnumSet.noneOf(MutationType.class);
What I had forgot to do was assign the XmlAccessorType as follows:
@XmlRootElement(name="SearchCriteria")
@XmlAccessorType(XmlAccessType.FIELD)
public class SearchCriteria
Thanks, it works!
ReplyDeleteIt works for me too. Just add @XmlAccessorType(XmlAccessType.FIELD)
ReplyDeleteto my class.
It works for me too, Thanks.
ReplyDeleteNice post. But why is this needed?
ReplyDelete