This document covers the logging facility and the utility for monitoring of SOAP messages.
The information is organized under the following headings.
This section provides details on the SOAP monitoring utility in Web Services Stack.
The information is organized under the following headings:
The distribution of Web Services Stack comes with a SOAP monitor that allows users to monitor SOAP messages exchanged between web service clients and web services running in Web Services Stack.
SOAP messages are shown with the structure that they have after they have passed all system phases in the Axis 2 engine. This means that the original SOAP messages, sent by a user, can be visually different, but semantically equal to the ones shown into the SOAP monitor. Examples of such a case are MTOM SOAP messages. SOAP monitor shows the binary data exchanged “by value” (included into the SOAP message itself). On the other hand, the original SOAP message has MIME parts in it.
For example, take a binary date shown into a TCPMon (another monitor). To make easy to understand, only part of the message related to the MTOM-ized binary data is shown:
<<ns1:binaryData><xop:Include href="cid:1.urn:uuid:EFF202258F699D83131220514272228@apache.org" xmlns:xop="http://www.w3.org/2004/08/xop/include" /></ns1:binaryData> … --MIMEBoundaryurn_uuid_EFF202258F699D83131220514272117 Content-Type: text/plain Content-Transfer-Encoding: binary Content-ID: <1.urn:uuid:EFF202258F699D83131220514272228@apache.org> text --MIMEBoundaryurn_uuid_EFF202258F699D83131220514272117—
The binary date that a SOAP monitor shows is the following:
<ns1:binaryData>dGV4dA==</ns1:binaryData>
As you can see, the binary data is shown “by value”. This is because it was already processed by the system phases of the Axis 2 engine.
SOAP monitor is disabled by default.
To enable SOAP monitor
Open the web.xml file that is located in the WEB-INF directory of the wsstack webapp.
Uncomment the
<servlet-name>SOAPMonitorService</servlet-name>
part.
Uncomment the <servlet-mapping>
part.
Extract the following SOAPMonitor
classes
from soapmonitor.jar and copy them directly under the
expanded wsstack context root:
org\apache\axis2\soapmonitor\applet\SOAPMonitorApplet$ServiceFilterPanel.class org\apache\axis2\soapmonitor\applet\SOAPMonitorApplet$SOAPMonitorData.class org\apache\axis2\soapmonitor\applet\SOAPMonitorApplet$SOAPMonitorFilter.class org\apache\axis2\soapmonitor\applet\SOAPMonitorApplet$SOAPMonitorPage.class org\apache\axis2\soapmonitor\applet\SOAPMonitorApplet$SOAPMonitorTableModel.class org\apache\axis2\soapmonitor\applet\SOAPMonitorApplet$SOAPMonitorTextArea.class org\apache\axis2\soapmonitor\applet\SOAPMonitorApplet.class
Important:
Ensure you keep the classes packaging structure.
There is no effect if you try to replce this step with any of the following:
Copy the soapmonitor.jar into the WEB-INF \lib
Copy the classes from soapmonitor.jar into WEB-INF\classes
Engage the soapmonitor Axis 2 module globally in the axis2.xml by adding the following line:
<module ref="soapmonitor"/>
You can engage it in the same way for a service in the services.xml file.
Restart Tomcat or the wsstack webapp.
Go to http://<host>:<port>/wsstack/SOAPMonitor to start using the SOAP monitor.
For more details on the SOAP monitor configuration, see http://ws.apache.org/axis2/1_4_1/soapmonitor-module.html.
This section provides details on the logging facility in Web Services Stack.
The information is organized under the following headings:
Web Services Stack uses Apache Common Logging (JCL) and its
log4J facility. The JCL provides thin-wrapper log
implementations for other logging tools, including the default
log4J
.
For details on log4J
, refer to Apache logging
services at
http://logging.apache.org/log4j/1.2/index.html.
Note:
The distribution of Web Services Stack comes with a log4j.properties file and a commons-logging.properties file by default. You can find them in <Web Services Stack_Install_Folder>/webapp\wsstack\WEB-INF\classes.
Note:
Those files are also included in the
wsstack.war web archive in <Web Services
Stack_Install_Folder>/webapp, in case you deploy Web Services
Stack another servlet container or application server.
To enable log4J
Place the commons-logging.properties file into the given module classpath.
The log4j.properties files come with a default value of the logging level. You can change those values according to the requirements of your system.
The default logging level is info
.
Following are the standard levels in descending (in terms of priority)
order:
fatal
error
warn
info
debug
trace
Note:
A lower level covers all levels above it. For example, if
warn
is set, then all logs of level
error
and fatal
are
logged, too.
It is important to ensure that the log messages are appropriate in content and severity. See the following table for guidelines on the usage of logging levels:
Logging Level | Usage |
---|---|
fatal |
Severe errors that cause premature termination. Expect these to be immediately visible on a status console. |
error |
Other run-time errors or unexpected conditions. Expect these to be immediately visible on a status console. |
warn |
Use of deprecated APIs, poor use of API, error-like situations, other run-time situations that are undesirable or unexpected, but not necessarily "wrong". Expect these to be immediately visible on a status console. |
info |
Interesting run-time events (start /shut down). Expect these to be immediately visible on a console, so be conservative and keep to a minimum. |
debug |
Detailed information on the flow through the system. Expect these to be written to logs only. |
trace |
More detailed information. Expect these to be written to logs only. |
Web Services Stack provides a logging mechanism for its agent programs that use the System Management Hub administration functionality. These agent programs are called "argus agents". They manipulate the Web Services Stack environment under the System Management Hub web interface. See Administration Tool for details.
If you experience problems when using the administration tool, you must enable the logging for the "argus agents" to see a detailed message log. It is recommended to use this logging mechanism only when you want to search for faults in the operation of the system. Otherwise, the performance of your interface might slow down.
To enable logging for the "argus agents"
Open the registry editor.
Go to HKEY_LOCAL_MACHINE\SOFTWARE\Software AG\System Management Hub\Products\Web Services Stack\Versions\Parameters\enableLog
Switch the registry parameter enableLog
to
"1".
You can find the output log file in <Web Services Stack_Install_Folder>/argus/wsstack.log.