I have an example that I have a List of objects inside another object like this:
the WebMethod:
public List<'Father> getFathers();
public class Father {
private String name;
@XmlElement(name = "child")
@XmlElementWrapper
private List<Child> children;
}
public class Child {
private String name;
}
Generating the XML:
<Father>
<name>XXX</name>
<Children>
<Child>
<name>YYY</name>
</Child>
<Child>
<name>ZZZ</name>
</Child>
</Children>
</Father>
so far is perfect.
But, when I generate the client the Jaxb generated:
public class Father {
private String name;
protected Father.Children
public static class Children {
protected List<Child> child;
}
}
How can I generate the client like the original class, in others words I would like to generate this:
public class Father {
private String name;
private List<Child> children;
}