Miles to go …

August 1, 2007

SOAP Message Logging in Metro and WCF

Filed under: webservices — arungupta @ 11:14 am

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 here.

In WCF (the Web services stack in .NET), the Configuration 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"?>
<configuration>
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging" switchValue="Warning, ActivityTracing">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
<add name="ServiceModelMessageLoggingListener">
<filter type="" />
</add>
</listeners>
</source>
</sources>
<sharedListeners>
<add initializeData="LOG_DIRECTORY\messages.svclog"
type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
<filter type="" />
</add>
</sharedListeners>
</system.diagnostics>
<system.serviceModel>
<diagnostics>
<messageLogging logEntireMessage="true" logMalformedMessages="true" logMessagesAtTransportLevel="true" />
</diagnostics>
</system.serviceModel>
</configuration>

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

Technorati: wcf webservices wsit metro glassfish

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • DZone
  • email
  • StumbleUpon
  • Technorati
  • Twitter
  • Slashdot
Related posts:
  1. TOTD #1: SOAP Messaging Logging in Metro
  2. Message Logging in WSIT Updated
  3. Message Logging in WSIT
  4. wsmonitor (Web Services Monitor): A light-weight SOAP and HTTP Traffic Monitoring tool
  5. TOTD #22: Java SE client for a Metro endpoint

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.
Powered by WordPress