Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 31st, 2012  |  syntax: None  |  size: 0.37 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Consuming XML in restful post
  2. @POST
  3. @Consumes(MediaType.APPLICATION_XML)
  4. public void consumeXML (/*something here- duno what*/){
  5.     //something here as well
  6. }
  7.        
  8. @POST
  9. @Consumes(MediaType.APPLICATION_XML)
  10. public void consumeXML ( InputStream xml ){
  11.     //do something with the XML string
  12. }
  13.        
  14. public void consumeXML ( String xml ){
  15.     //do something with the XML string
  16. }