I am trying the samples from the Learning WCF book and trying to inspect the HTTP request/response. I can see the HTTP Request headers in MS TraceViewer but strangely not the response headers. (only envelope). If you notice something amiss, could you please let me know?
<configuration>
<system.serviceModel>
<diagnostics>
<messageLogging logEntireMessage="true" logMalformedMessages="true"
logMessagesAtServiceLevel="true"/>
</diagnostics>
<!--other stuff-->
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Off, ActivityTracing">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
<add initializeData="x.log" type="System.Diagnostics.XmlWriterTraceListener"
name="sdt">
<filter type="" />
</add>
</listeners>
</source>
<source name="System.ServiceModel.MessageLogging" switchValue="Verbose,ActivityTracing">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
<add name="ServiceModelMessageLoggingListener">
<filter type="" />
</add>
</listeners>
</source>
</sources>
<sharedListeners>
<add initializeData="D:\temp\messages.xml" type="System.Diagnostics.XmlWriterTraceListener, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
name="ServiceModelMessageLoggingListener" traceOutputOptions="Timestamp">
<filter type="" />
</add>
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>
</configuration>
Request gets logged properly:
<MessageLogTraceRecord>
<HttpRequest xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
<Method>POST</Method>
<QueryString></QueryString>
<WebHeaders>
<SOAPAction>"http://www.thatindigogirl.com/samples/2006/06/GigManagerServiceContract/SaveGig"</SOAPAction>
<Connection>Keep-Alive</Connection>
<Content-Length>485</Content-Length>
<Content-Type>text/xml; charset=utf-8</Content-Type>
<Expect>100-continue</Expect>
<Host>localhost:8000</Host>
</WebHeaders>
</HttpRequest>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://localhost:8000/GigManagerService</To>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://www.thatindigogirl.com/samples/2006/06/GigManagerServiceContract/SaveGig</Action>
</s:Header>
<s:Body>
<SaveGig xmlns="http://www.thatindigogirl.com/samples/2006/06">
<item xmlns:a="wcf_expts" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<a:DateEnd>2009-11-01T05:30:00</a:DateEnd>
<a:DateStart>2009-10-31T22:30:00</a:DateStart>
<a:Description>some desc</a:Description>
<a:Id>0</a:Id>
<a:Place i:nil="true"></a:Place>
<a:Title>some boring event</a:Title>
<a:Url>http://askfdj.com</a:Url>
</item>
</SaveGig>
</s:Body>
</s:Envelope>
</MessageLogTraceRecord>
and the Response I see in Trace Viewer (why no headers, http response?)
<MessageLogTraceRecord>
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://www.thatindigogirl.com/samples/2006/06/GigManagerServiceContract/SaveGigResponse</Action>
</s:Header>
<s:Body>
<SaveGigResponse xmlns="http://www.thatindigogirl.com/samples/2006/06"></SaveGigResponse>
</s:Body>
</s:Envelope>
</MessageLogTraceRecord>