Author: buildbot
Date: Fri Nov 20 11:47:30 2015
New Revision: 973046
Log:
Production update by buildbot for cxf
Modified:
websites/production/cxf/content/cache/docs.pageCache
websites/production/cxf/content/docs/debugging-and-logging.html
Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.
Modified: websites/production/cxf/content/docs/debugging-and-logging.html
==============================================================================
--- websites/production/cxf/content/docs/debugging-and-logging.html (original)
+++ websites/production/cxf/content/docs/debugging-and-logging.html Fri Nov 20
11:47:30 2015
@@ -117,12 +117,12 @@ Apache CXF -- Debugging and Logging
<td height="100%">
<!-- Content -->
<div class="wiki-content">
-<div id="ConfluenceContent"><p> </p><p> </p><p></p><p><span
class="inline-first-p" style="font-size:2em;font-weight:bold"> Debugging and
Logging </span></p><p></p><p> </p><p> </p><p><style
type="text/css">/*<![CDATA[*/
-div.rbtoc1435780115989 {padding: 0px;}
-div.rbtoc1435780115989 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1435780115989 li {margin-left: 0px;padding-left: 0px;}
+<div id="ConfluenceContent"><p><span class="inline-first-p"
style="font-size:2em;font-weight:bold">Debugging and
Logging</span> </p><p><style type="text/css">/*<![CDATA[*/
+div.rbtoc1448020010991 {padding: 0px;}
+div.rbtoc1448020010991 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1448020010991 li {margin-left: 0px;padding-left: 0px;}
-/*]]>*/</style></p><div class="toc-macro rbtoc1435780115989">
+/*]]>*/</style></p><div class="toc-macro rbtoc1448020010991">
<ul class="toc-indentation"><li><a shape="rect"
href="#DebuggingandLogging-LoggingMessages">Logging Messages</a>
<ul class="toc-indentation"><li><a shape="rect"
href="#DebuggingandLogging-Configuringlogginglevels">Configuring logging
levels</a></li><li><a shape="rect"
href="#DebuggingandLogging-UsingLog4jInsteadofjava.util.logging">Using Log4j
Instead of java.util.logging</a></li><li><a shape="rect"
href="#DebuggingandLogging-UsingSLF4JInsteadofjava.util.logging(since2.2.8)">Using
SLF4J Instead of java.util.logging (since 2.2.8)</a></li></ul>
</li><li><a shape="rect" href="#DebuggingandLogging-DebuggingTools">Debugging
Tools</a>
@@ -200,7 +200,7 @@ java.util.logging.ConsoleHandler.level =
</java>
</target>
</pre>
-</div></div><p>Alternatively, for SOAP clients, you can modify the Java-wide
logging.properties file in the JDK_HOME/jre/lib folder, or for servlet-hosted
web service providers, placing a logging.properties file in the WEB-INF/classes
folder (see <a shape="rect" class="external-link"
href="http://tomcat.apache.org/tomcat-6.0-doc/logging.html">here</a> for more
details.)</p><h2
id="DebuggingandLogging-UsingLog4jInsteadofjava.util.logging">Using Log4j
Instead of java.util.logging</h2><p>As noted above, CXF uses the
<code>java.util.logging</code> package ("Java SE Logging") by default. But it
is possible to switch CXF to instead use <a shape="rect" class="external-link"
href="http://logging.apache.org/log4j/">Log4J</a>. This is achieved through the
use of configuration files. There are two options to bootstrapping CXF logging
and each is listed below:</p><ul><li>Add the following system property to the
classpath from which CXF is initialized:</li></ul><div class="code panel pdl"
style=
"border-width: 1px;"><div class="codeContent panelContent pdl">
+</div></div><p>Alternatively, for SOAP clients, you can modify the Java-wide
logging.properties file in the JDK_HOME/jre/lib folder, or for servlet-hosted
web service providers, placing a logging.properties file in the WEB-INF/classes
folder (see <a shape="rect" class="external-link"
href="http://tomcat.apache.org/tomcat-8.0-doc/logging.html">here</a> for more
details.)</p><h2
id="DebuggingandLogging-UsingLog4jInsteadofjava.util.logging">Using Log4j
Instead of java.util.logging</h2><p>As noted above, CXF uses the
<code>java.util.logging</code> package ("Java SE Logging") by default. But it
is possible to switch CXF to instead use <a shape="rect" class="external-link"
href="http://logging.apache.org/log4j/">Log4J</a>. This is achieved through the
use of configuration files. There are two options to bootstrapping CXF logging
and each is listed below:</p><ul><li>Add the following system property to the
classpath from which CXF is initialized:</li></ul><div class="code panel pdl"
style=
"border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">-Dorg.apache.cxf.Logger=org.apache.cxf.common.logging.Log4jLogger
</pre>
</div></div><ul><li>Add the file
<code>META-INF/cxf/org.apache.cxf.Logger</code> to the classpath and make sure
it contains the following content:</li></ul><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
@@ -212,7 +212,7 @@ java.util.logging.ConsoleHandler.level =
</div></div><ul><li>Add the file
<code>META-INF/cxf/org.apache.cxf.Logger</code> to the classpath and make sure
it contains the following content:</li></ul><div class="code panel pdl"
style="border-width: 1px;"><div class="codeContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;">org.apache.cxf.common.logging.Slf4jLogger
</pre>
-</div></div><h1 id="DebuggingandLogging-DebuggingTools">Debugging
Tools</h1><h2 id="DebuggingandLogging-EclipseIDE">Eclipse IDE</h2><p>See this
<a shape="rect" class="external-link"
href="http://www.jroller.com/gmazza/entry/eclipse_debug_web_services"
rel="nofollow">blog entry</a> for information on debugging web services using
Eclipse. Note this is primarily for tracing/debugging source code; you will
probably still want to use one of the tools below to capture network traffic,
view SOAP requests and responses, etc.</p><h2
id="DebuggingandLogging-NetBeansIDE">NetBeans IDE</h2><p>NetBeans include a <a
shape="rect" class="external-link"
href="http://www.netbeans.org/features/java/debugger.html"
rel="nofollow">debugger</a>, <a shape="rect" class="external-link"
href="http://www.netbeans.org/features/java/profiler.html"
rel="nofollow">profiler</a> and an HTTP monitor that can assist in
troubleshooting SOA applications.</p><h2
id="DebuggingandLogging-tcpmonandtcptrace">tcpmon and tcptra
ce</h2><p><a shape="rect" class="external-link"
href="http://tcpmon.dev.java.net" rel="nofollow">tcpmon</a> allows you to
easily view messages as they go back and forth on the wire. The companion
utility <a shape="rect" class="external-link" href="http://www.tcptrace.org"
rel="nofollow">tcptrace</a> can be used for analysis of the dump.</p><h2
id="DebuggingandLogging-WSMonitor">WSMonitor</h2><p><a shape="rect"
class="external-link" href="https://wsmonitor.dev.java.net/"
rel="nofollow">WSMonitor</a> in another option to Tcpmon with slightly more
functionality.</p><h2 id="DebuggingandLogging-NetSniffer">NetSniffer</h2><p><a
shape="rect" class="external-link"
href="http://www.miray.de/products/sat.netsniffer.html"
rel="nofollow">NetSniffer</a> makes it possible to track the network traffic
between arbitrary devices within a LAN segment.</p><h2
id="DebuggingandLogging-Wireshark">Wireshark</h2><p><a shape="rect"
class="external-link" href="http://www.wireshark.org/" rel="nofollow">Wiresh
ark</a>, a network packet analyzer, is useful for following the routing of
SOAP messages. It can also help when you are getting an HTML error message from
the server that your CXF client cannot normally process, by allowing you to see
the non-SOAP error message. See this <a shape="rect" class="external-link"
href="http://www.jroller.com/gmazza/entry/soap_calls_over_wireshark"
rel="nofollow">blog entry</a> for more information.</p><h2
id="DebuggingandLogging-SOAPUI">SOAP UI</h2><p><a shape="rect"
class="external-link" href="http://soapui.org" rel="nofollow">SOAP UI</a> can
also be used for debugging. In addition to viewing messages, it allows you send
messages and load test your services. It also has plugins for the <a
shape="rect" class="external-link"
href="http://soapui.org/IDE-Plugins/eclipse-plugin.html" rel="nofollow">Eclipse
IDE</a>, <a shape="rect" class="external-link"
href="http://www.soapui.org/IDE-Plugins/netbean.html" rel="nofollow">NetBeans
IDE</a> and <a shape="rect" c
lass="external-link" href="http://www.soapui.org/IDE-Plugins/intellij.html"
rel="nofollow">IntelliJ IDEA</a>.</p><h1
id="DebuggingandLogging-OtherHelpfulTools">Other Helpful Tools</h1><h2
id="DebuggingandLogging-WSDLViewer">WSDL Viewer</h2><p><a shape="rect"
class="external-link" href="http://tomi.vanek.sk/index.php?page=wsdl-viewer"
rel="nofollow">WSDL Viewer</a> is a small tool to visualize web-services in a
more intuitive way.</p><h1 id="DebuggingandLogging-SOAPFaultfordebugging">SOAP
Fault for debugging</h1><p><strong>This feature is available since CXF
2.3.4</strong></p><h2 id="DebuggingandLogging-Stacktraceinfaultdetails">Stack
trace in fault details</h2><p>CXF supports the ability to put server stack
trace information into the fault message fault details, if you enable the
option of 'faultStackTraceEnabled'. It is useful for debugging if the soap
fault message is not defined in the WSDL operation.</p><div class="code panel
pdl" style="border-width: 1px;"><div class="codeConte
nt panelContent pdl">
+</div></div><h1 id="DebuggingandLogging-DebuggingTools">Debugging
Tools</h1><h2 id="DebuggingandLogging-EclipseIDE">Eclipse IDE</h2><p>See this
<a shape="rect" class="external-link"
href="https://web-gmazza.rhcloud.com/blog/entry/eclipse-debug-web-services"
rel="nofollow">blog entry</a> for information on debugging web services using
Eclipse. Note this is primarily for tracing/debugging source code; you will
probably still want to use one of the tools below to capture network traffic,
view SOAP requests and responses, etc.</p><h2
id="DebuggingandLogging-NetBeansIDE">NetBeans IDE</h2><p>NetBeans include a <a
shape="rect" class="external-link"
href="http://www.netbeans.org/features/java/debugger.html"
rel="nofollow">debugger</a>, <a shape="rect" class="external-link"
href="http://www.netbeans.org/features/java/profiler.html"
rel="nofollow">profiler</a> and an HTTP monitor that can assist in
troubleshooting SOA applications.</p><h2
id="DebuggingandLogging-tcpmonandtcptrace">tcpmon and
tcptrace</h2><p><a shape="rect" class="external-link"
href="http://tcpmon.dev.java.net" rel="nofollow">tcpmon</a> allows you to
easily view messages as they go back and forth on the wire. The companion
utility <a shape="rect" class="external-link" href="http://www.tcptrace.org"
rel="nofollow">tcptrace</a> can be used for analysis of the dump.</p><h2
id="DebuggingandLogging-WSMonitor">WSMonitor</h2><p><a shape="rect"
class="external-link" href="https://wsmonitor.dev.java.net/"
rel="nofollow">WSMonitor</a> in another option to Tcpmon with slightly more
functionality.</p><h2 id="DebuggingandLogging-NetSniffer">NetSniffer</h2><p><a
shape="rect" class="external-link"
href="http://www.miray.de/products/sat.netsniffer.html"
rel="nofollow">NetSniffer</a> makes it possible to track the network traffic
between arbitrary devices within a LAN segment.</p><h2
id="DebuggingandLogging-Wireshark">Wireshark</h2><p><a shape="rect"
class="external-link" href="http://www.wireshark.org/" rel="nofollow">
Wireshark</a>, a network packet analyzer, is useful for following the routing
of SOAP messages. It can also help when you are getting an HTML error message
from the server that your CXF client cannot normally process, by allowing you
to see the non-SOAP error message. See this <a shape="rect"
class="external-link"
href="http://www.jroller.com/gmazza/entry/soap_calls_over_wireshark"
rel="nofollow">blog entry</a> for more information.</p><h2
id="DebuggingandLogging-SOAPUI">SOAP UI</h2><p><a shape="rect"
class="external-link" href="http://soapui.org" rel="nofollow">SOAP UI</a> can
also be used for debugging. In addition to viewing messages, it allows you send
messages and load test your services. It also has plugins for the <a
shape="rect" class="external-link"
href="http://soapui.org/IDE-Plugins/eclipse-plugin.html" rel="nofollow">Eclipse
IDE</a>, <a shape="rect" class="external-link"
href="http://www.soapui.org/IDE-Plugins/netbean.html" rel="nofollow">NetBeans
IDE</a> and <a shape="r
ect" class="external-link"
href="http://www.soapui.org/IDE-Plugins/intellij.html" rel="nofollow">IntelliJ
IDEA</a>.</p><h1 id="DebuggingandLogging-OtherHelpfulTools">Other Helpful
Tools</h1><h2 id="DebuggingandLogging-WSDLViewer">WSDL Viewer</h2><p><a
shape="rect" class="external-link"
href="http://tomi.vanek.sk/index.php?page=wsdl-viewer" rel="nofollow">WSDL
Viewer</a> is a small tool to visualize web-services in a more intuitive
way.</p><h1 id="DebuggingandLogging-SOAPFaultfordebugging">SOAP Fault for
debugging</h1><p><strong>This feature is available since CXF
2.3.4</strong></p><h2 id="DebuggingandLogging-Stacktraceinfaultdetails">Stack
trace in fault details</h2><p>CXF supports the ability to put server stack
trace information into the fault message fault details, if you enable the
option of 'faultStackTraceEnabled'. It is useful for debugging if the soap
fault message is not defined in the WSDL operation.</p><div class="code panel
pdl" style="border-width: 1px;"><div class="cod
eContent panelContent pdl">
<pre class="brush: java; gutter: false; theme: Default"
style="font-size:12px;"><jaxws:endpoint id="server"
address="http://localhost:9002/TestMessage"
wsdlURL="ship.wsdl"
endpointName="s:TestSoapEndpoint"