title: Capturing SOAP messages in C# client
body: <p>I've been working on writing a client in C# that consumes a third-party web service. I have a wsdl from them and the reference it generated works fine for the most part. There are a couple problems that I'm running into, however, and the good folks that run the service have provided no help.</p>
  
  <p>I've deduced that the most effective way to pinpoint the problem is to capture the outbound and inbound SOAP messages to compare against the prototypes shown in their design document. I know that, based on the wsdl and the code from an existing Java app (and their own examples), that I'm supplying the right arguments when I call the service's methods. If I can prove that the messages I'm sending the service conform to their prototypes, then I can at least punt the problem to them with proof that it's their fault, not mine, thereby (hopefully) causing them to either provide updated documentation or fix the service.</p>
  
  <p>What I can't figure out is how to set up this sort of message capture in C#. I've read a bunch about SoapExtension and WCF and the like, but this isn't a WCF application and adding any sort of logging information to app.config appears to do nothing when I run the application. None of the other code samples I've found online work either.</p>
  
  <p>How should I approach this? Is it necessary to try to convert this client to a WCF platform (and what are the implications for creating a console interface and standalone GUI if I do)? Should I try to create a derived class inheriting from the wsdl-generated class and code the captures from scratch? Did I miss some sort of handy tool that can do this all for me without requiring me to do a bunch of coding?</p>
  
  <p>Any help is greatly appreciated.</p>