title: WCF Generic FaultException Not Populating SOAP Body Detail Element
body: <p>When I attempt to throw a <code>FaultException&lt;T&gt;</code>, if I generate the Message manually, I get correct SOAP message. However, when I throw the <code>FaultException&lt;T&gt;</code> from my method on the server, I do not get a correct SOAP message. The SOAP message has a Header / Action value of <a href="http://www.w3.org/2005/08/addressing/soap/fault" rel="nofollow">http://www.w3.org/2005/08/addressing/soap/fault</a>, and my Body / Fault / Detail element is missing completely.</p>
  
  <p>Please have a look at the important sections of my code.</p>
  
  <p>The Service Contract</p>
  
  <pre><code>[ServiceContract(Namespace = "http://namespace.com/fault")]
  public interface IFaultService
  {
      [OperationContract(IsOneWay = false)]
      [FaultContract(typeof (MyFault))]
      void ThrowFaultException();
  }
  </code></pre>
  
  <p>The implementation
  (The message_fault and message are manually created for testing only)</p>
  
  <pre><code>    public class FaultService : IFaultService
  {
      public void ThrowFaultException()
      {
          var fault = new MyFault("This is from the service");
          var fault_exception = new FaultException&lt;MyFault&gt;
              (fault,
               "Fault Service Reason",
               FaultCode.CreateReceiverFaultCode("FaultCodeName","http://namespace.com/fault"),
               "http://namespace.com/fault/IFaultService/ThrowFaultExceptionMyFaultFault");
  
                      var message_fault = fault_exception.CreateMessageFault();
          var message = Message.CreateMessage(MessageVersion.Soap12WSAddressing10, message_fault,
                                              fault_exception.Action);
  
          throw fault_exception;
      }
  }
  </code></pre>
  
  <p>The Data Contract</p>
  
  <pre><code>[DataContract(Namespace = "http://namespace.com/fault")]
  public class MyFault
  {
      public MyFault(string Message)
      {
          this.Message = Message;
      }
  
      [DataMember]
      public string Message { get; set; }
  }
  </code></pre>
  
  <p>The web.config system.serviceModel section</p>
  
  <pre><code>&lt;system.serviceModel&gt;   
      &lt;bindings&gt;   
        &lt;wsHttpBinding&gt;
          &lt;binding name="wsHttpBindingNoSecurity"&gt;
            &lt;security mode="None"/&gt;
          &lt;/binding&gt;
        &lt;/wsHttpBinding&gt;
     &lt;services&gt;
        &lt;service name="FaultService"&gt;
          &lt;endpoint address="ws"
                    binding="wsHttpBinding"
                    bindingConfiguration="wsHttpBindingNoSecurity"
                    bindingNamespace="http://namespace.com/fault"
                    contract="IFaultService"
                    name="ws"&gt;
          &lt;/endpoint&gt; 
        &lt;/service&gt;
      &lt;/services&gt;
  ...
  &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>Manually generated SOAP message </p>
  
  <pre><code>{&lt;s:Envelope xmlns:a="http://www.w3.org/2005/08/addressing" xmlns:s="http://www.w3.org/2003/05/soap-envelope"&gt;
    &lt;s:Header&gt;
      &lt;a:Action s:mustUnderstand="1"&gt;http://namespace.com/fault/IFaultService/ThrowFaultExceptionMyFaultFault&lt;/a:Action&gt;
    &lt;/s:Header&gt;
    &lt;s:Body&gt;
      &lt;s:Fault&gt;
        &lt;s:Code&gt;
          &lt;s:Value&gt;s:Receiver&lt;/s:Value&gt;
          &lt;s:Subcode&gt;
            &lt;s:Value xmlns:a="http://namespace.com/fault"&gt;a:FaultCodeName&lt;/s:Value&gt;
          &lt;/s:Subcode&gt;
        &lt;/s:Code&gt;
        &lt;s:Reason&gt;
          &lt;s:Text xml:lang="en-US"&gt;Fault Service Reason&lt;/s:Text&gt;
        &lt;/s:Reason&gt;
        &lt;s:Detail&gt;
          &lt;MyFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://namespace.com/fault"&gt;
            &lt;Message&gt;This is from the service&lt;/Message&gt;
          &lt;/MyFault&gt;
        &lt;/s:Detail&gt;
      &lt;/s:Fault&gt;
    &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;}
  </code></pre>
  
  <p>But the actual SOAP that comes across is</p>
  
  <pre><code>&lt;s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"&gt;
  &lt;s:Header&gt;
  &lt;a:Action s:mustUnderstand="1"&gt;http://www.w3.org/2005/08/addressing/soap/fault&lt;/a:Action&gt;
  &lt;a:RelatesTo&gt;urn:uuid:a3587103-953a-43f6-9691-951c21de8418&lt;/a:RelatesTo&gt;
  &lt;ActivityId CorrelationId="23bf0a82-f4ac-4227-85ab-600f6ffe6a6f" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics"&gt;a0945fa9-f5a3-4958-8682-097a8315f0dc&lt;/ActivityId&gt;
  &lt;/s:Header&gt;
  &lt;s:Body&gt;
  &lt;s:Fault&gt;
  &lt;s:Code&gt;
  &lt;s:Value&gt;s:Sender&lt;/s:Value&gt;
  &lt;/s:Code&gt;
  &lt;s:Reason&gt;
  &lt;s:Text xml:lang="en-US"&gt;Fault Service Reason&lt;/s:Text&gt;
  &lt;/s:Reason&gt;
  &lt;/s:Fault&gt;
  &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>Thanks in advance.</p>