users@jersey.java.net

Re: [Jersey] Re: Consuming XML using Jersey

From: Pavel Bucek <Pavel.Bucek_at_Sun.COM>
Date: Fri, 05 Mar 2010 10:00:47 +0100

In that case, you can use Document (or DOMSource) as parameter and parse
it by yourself.

@POST
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.APPLICATION_XML)
public String getObjectAsXML(org.w3c.dom.Document document) {

        ...

}


Regards,
Pavel



emile wrote:
> Hi Pavel,
>
> Thanks for the response. I have considered JAXB; but i dont really require
> the incoming XML to be mapped into an object. I just need to parse the XML
> using DOM to obtain certain data.
>