package camelinaction; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "items") @XmlAccessorType(XmlAccessType.FIELD) public class ItemsDto { @XmlElementRef private List<ItemDto> items; public List<ItemDto> getItems() { return items; } public void setItems(List<ItemDto> items) { this.items = items; } }