Pardon me for posting this noob question, but I have been debugging this problem for quite awhile now. I\'m having a little problem trying to get the response to return the
I solved this problem with Spring 3 mvc without MarshallingView
@RequestMapping(value = "actionName.xml", method = RequestMethod.GET)
public HttpEntity getXml(ModelMap map, HttpServletResponse response) {
String xml = generateSomeXml();
byte[] documentBody = xml.getBytes();
HttpHeaders header = new HttpHeaders();
header.setContentType(new MediaType("application", "xml"));
header.setContentLength(documentBody.length);
return new HttpEntity(documentBody, header);
}
that's all. greetings