MultivaluedMap<String, String> headers = request.getRequestHeaders();
String s = request.getHeaderValue("Content-Type");
if ("text/plain".equals(s)) { //Let's pretend we accept text/plain as XML
headers.remove("Content-Type");
headers.add("Content-Type", "application/xml");
InBoundHeaders iheaders = new InBoundHeaders();
for(String k: headers.keySet()) {
iheaders.add(k, headers.getFirst(k));
}
request.setHeaders(iheaders);
}
return request;
}