@GET @Path("{id}") @Produces("application/xml") public T getByIdAsXml(@PathParam("id") int id) { T one = (T) dao.findById(id); return one; }