I have successfully marshaled the following class
@XmlRootElement(name = "Field")
private static class MyField {
@XmlAttribute(name = "Name")
String name;
@XmlElement(name = "Size")
int size;
....}
Now I want to have my container class to hold multiple instances of Field, so I declared a class in the following way:
private static class MyFieldsCollection {
private Collection<MyField> fields = new LinkedList<MyField>();
public MyFieldsCollection() {}
....}
When I simply try to marshal the container field I get the following error:
class java.util.LinkedList nor any of its super class is known to this context
How do I annotate the fields member so the container class will be marshaled as a collection of fields?