Is it possible to get the raw XML payload using Metro web services framework?
问题 I'm writing a web service client that runs in Apache Tomcat. I need to get the XML payload for the request/response so that I can log it. Dumping the bytes to stdOut is not what I want. I want to get it as bytes in my Java code, so that I can log it the way that I want. Is there any way to do this? 回答1: Yes, there is. It is one of main purposes of JAX-WS handlers. You will not get XML payload as raw bytes, but formatted; however if you want it is easy to turn it into raw bytes again. An