Spring-WS : specifying the Content-Type
问题 I have a Spring Webservice based on AbstractJDomPayloadEndpoint . This service works fine, except that my client needs the HTTP header Content-Type to be set to the right charset (utf-8 in my case). I cant find where I can configure that. I tried writing a simple servlet Filter : chain.doFilter(request, response); HttpServletResponse httpResponse = (HttpServletResponse) response; httpResponse.setHeader("Content-Type", "text/xml; charset=utf-8"); But this doesnt change the headers at all. I