I am having trouble with JAXB annotations for a field that is a list whose generified type is an interface. When I have it declared such as:
private List<Animal> animals;
I'm using JAXB and xjc to compile my XML Schema into Java classes. I do not want to manually edit this generated classes. I have xml schema like that:
I have a class with a XmlElementWrapper annotation like:
private List<SomeType> someList = ...
I want to Generate XML that look like this :
I am trying to represent the following xml code: