@GET @Path("{id}") @Produces("application/xml") public T getByIdAsXml(@PathParam("id") int id) { T one = (T) dao.findById(id); return one; }
@GET @Produces("application/xml") public String getAllAsXml() { List<T> all = dao.findAll(); EntityList<T> list = new EntityList<T>(); list.setItems(all); String s = marshall(entityClass, list); return s; }