Im using Jersey to build a REST Service and want to return a Collection as XML.
Collection
@GET @Produces(MediaType.TEXT_XML) @Path(\"/direct
adding @XmlRootElement(name = "class name") to the object I want to return , resolved my issue