Example: Use resource facades
Here is an example of such a resource facade for a collection of Comments: @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) public class ScrollableCollection implements ResourceFacade { private String bookId; @XmlAttribute private int start; @XmlAttribute private int totalRecords; @XmlElement private List comments = new ArrayList(); @XmlElementRef private RESTServiceDiscovery rest; public Class facadeFor() { return Comment.class; } public Map pathParameters() { HashMap map = new HashMap(); map.put("id", bookId); return map; } } This will produce such an XML collection: great book terrible book