|Apache CXF 2.0 Documentation > Index > Debugging|
CXF includes two logging interceptors which output the incoming/outgoing messages to the Java log. To enable, you need to add these interceptors to your endpoint.
If you have a JAX-WS endpoint, you would want to do this:
import javax.xml.ws.Endpoint; import org.apache.cxf.core.interceptor.LoggingInInterceptor; import org.apache.cxf.core.interceptor.LoggingOutInterceptor; import org.apache.cxf.jaxws.EndpointImpl; EndpointImpl ep = (EndpointImpl) Endpoint.publish("http://localhost/service", service); ep.getServer().getEndpoint().getInInterceptors().add(new LoggingInInterceptor()); ep.getServer().getEndpoint().getOutInterceptors().add(new LoggingOutInterceptor());
TCPMon can be downloaded here and allows you to easily view messages as they go back and forth on the wire.
SOAP UI can also be used for debugging. In addition to viewing messages, it allows you send messages and load test your services. It also has Eclipse/IDEA plugins.