|
Debugging has been edited by Jervis Liu (Sep 10, 2007). Content:Logging MessagesCXF 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()); You can also enable message logging through CXF configuration Configure logging levels.CXF uses Java SE Logging .level= FINE java.util.logging.ConsoleHandler.level = FINE Once this done, you will need to set the -Djava.util.logging.config.file property to the location of the logging.properties file. As an example, the Ant target below has this property set: <target name="runClient"> <java classname="client.WSClient" fork="true"> <classpath> <pathelement location="${build.classes.dir}"/> <fileset dir="${env.CXF_HOME}/lib"> <include name="*.jar"/> </fileset> </classpath> <jvmarg value="-Djava.util.logging.config.file=/usr/myclientapp/logging.properties"/> </java> </target> Debugging ToolsTcpmonTCPMon WSMonitorWSMonitor SOAP UISOAP UI |
Unsubscribe or edit your notifications preferences
