I am trying to generate and return an XML using below class
@Path("/portaldetails")
public class PortalResource {
@GET
@Produces({MediaType.APPLICATION_XML})
public Document getLeaveDetails(@QueryParam("portalId") String portalId) {
Few steps to generate XML document using Dom4J
return portalXMLDoc;
}
}
I am getting below exception
[3/23/10 15:52:19:982 EDT] 00000023 ContainerResp E A message body writer
for Java type, class org.dom4j.tree.DefaultDocument, and MIME media type,
application/xml, was not found
Could anyone, please provide me either a sample class implementing
MessageBodyWriter for above scenario or any material to get details about
the same.
Thanks for the help.
--
View this message in context: http://n2.nabble.com/MessageBodyWriter-Example-for-XML-tp4786769p4786769.html
Sent from the Jersey mailing list archive at Nabble.com.