Hi , need some advice on how to RECEIVE XML data using a REST service, I want to accept XML data and have
the REST SERVICE process the XML data and deliver a response.
Would one store the entire XML document in a POST variable, using @POST together with String on the java rest service side?
and is it "safe" to have XML document stored in the POST variable or does have to be URLENCODED or BASE64 encoded?
Author and all-around good cowpoke
Joined: Mar 22, 2000
1. The XML document should be written (as text) in the body of the POST request.
2. Not sure what you mean by "safe" - what security problems are you worried about?
3. Since XML documents are text, there appears to be no reason to encode.
4. Just read the request input stream for processing - see getInputStream or getReader