Skip to main content

SOAP Message Logging in Metro and WCF

Posted by arungupta on August 1, 2007 at 11:13 AM PDT

Metro provides Secure, Reliable,
Transactional and .NET 3.0 interoperable Web services stack in
GlassFish. This entry explains how to
enable SOAP message logging in Metro and .NET 3.0.

The SOAP message logging in Metro is explained


In WCF (the Web services stack in .NET), the
Editor Tool
is the

preferred way
to enable SOAP message logging. But sometimes you may want to
directly edit your configuration file, for example, if you do not want to
re-generate the file again. In such cases you can include the XML fragments from
the template configuration file given below into your application specific
configuration and this will enable only SOAP message logging:

<?xml version="1.0" encoding="utf-8"?>
      <source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing">
          <add type="System.Diagnostics.DefaultTraceListener" name="Default">
            <filter type="" />
          <add name="ServiceModelMessageLoggingListener">
            <filter type="" />
      <add initializeData="LOG_DIRECTORY\messages.svclog"
           type="System.Diagnostics.XmlWriterTraceListener, System, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"
           name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
        <filter type="" />
      <messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtTransportLevel="true" />

After the client application is invoked, all SOAP messages will be logged to
LOG_DIRECTORY\messages.svclog file. The message log can be viewed

Technorati: wcf

Related Topics >>