I have been doing lots of googling lately trying to find a decent documentation/tutorial to consume XML in JAVA RestFUL implementation of webservice. My requirements are simple
- I want to consume XML
Which means that i need XML in raw. I don’t need any JAXB binding or any objection conversation. Can someone point me to some decent tutorial or post something here
@POST
@Consumes(MediaType.APPLICATION_XML)
public void consumeXML (/*something here- duno what*/){
//something here as well
}
thanks
I would recommend specifying an
InputStreamas the method parameter.Then the
InputStreamcan be processed using any number of technologies: DOM, SAX, StAX, JAXB, etc.