The following trace specifications are used to
trace SOAP messages:
com.ibm.ws.webservices.trace.MessageTrace=all
This
specification traces the contents of a SOAP message, including the
binary attachment data.
When the context-type of the SOAP message
is not text and xml, the message probably contains attachments. In
this case, the message is displayed in the trace file in the hex dump
format. The following example illustrates a line in the hex dump format
for non-text SOAP messages:
0000: 0D 0A 2D 2D 2D 2D 2D 2D - 3D 5F 50 61 72 74 5F 36 ..------=_Part_6
- In each trace file line, 16 bytes of the message are displayed
- The first four digits are a hex number whose value is the byte
offset into the SOAP message of the first byte on the line.
- The next 16 two-digit hex numbers are the contents of each of
the consecutive bytes in the message.
- The ASCII representation of the bytes is displayed in the last
16 characters of the line, with unprintable characters that are represented
by a period.
*=off:com.ibm.ws.webservices.*=all
You can
trace all web services information, including the SOAP messages and
the user-defined exceptions, with this setting.
You can enable logging of user-defined exceptions by specifying
the com.ibm.ws.webservices.trace.UserExceptionTrace=all
trace
string. The user-defined exceptions are not logged by default. A user-defined
exception is an exception that is defined in the Web Services Description
Language (WSDL) file for an operation.
A user-defined exception
often indicates an error-free condition. For example, the user-defined
OverdrawnException exception, can occur for the service endpoint implementation
of the makeWithdrawl
method. This exception indicates
an expected condition and does not indicate an error in the service
endpoint implementation. Because these types of exceptions can occur
during normal processing, they are not logged by default. When a user-defined
exception is logged, the information is sent to the trace.log file
and not to the SystemOut.log file.
Note: This topic references one or more of the application server log files. As a
recommended alternative, you can configure the server to use the High Performance Extensible Logging
(HPEL) log and trace infrastructure instead of using
SystemOut.log ,
SystemErr.log,
trace.log, and
activity.log files on distributed and IBM®
i systems. You can also use HPEL in conjunction with your native z/OS® logging facilities. If you are using HPEL, you can access all of your log and trace
information using the LogViewer command-line tool from your server profile bin directory. See the
information about using HPEL to troubleshoot applications for more
information on using HPEL.
You can also
use the following trace strings to enable tracing for user-defined
exceptions, as well as other trace points:
Avoid trouble: Please
note once this trace is turned on, the whole SOAP message payload
will be written into trace file. If there is any confidential information
(such as user ID or password) in the SOAP message as part of the payload,
they will be output as plain text as well. Please properly plan to
protect the security of your information.
Note: For
JAX-WS web service, there are two ways (normal level and minimal level)
to print out both the
Outbound HTTP SOAP message and the
Inbound
HTTP SOAP message in the trace file.
- Normal level by setting
com.ibm.ws.websvcs.trace.*=all
- Minimal level by setting
com.ibm.ws.websvcs.trace.MessageTrace=all:com.ibm.ws.websvcs.trace.LogFilterInputStream=all