title: Moving namespace on fault exception to envelope WCF services
body: <p>I am struggling. I am trying to implement a custom fault in WCF.</p>
  
  <p>I would like to move the namespace from the Fault Contract class to the envelope</p>
  
  <p>Currently :</p>
  
  <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"&gt;
    &lt;s:Body&gt;
      &lt;s:Fault&gt;
    &lt;faultcode&gt;s:Client&lt;/faultcode&gt;
    &lt;faultstring xml:lang="en-ZA"&gt;This meter has been blocked&lt;/faultstring&gt;
    &lt;detail&gt;
      &lt;xmlvendFaultResp xmlns="http://www.nrs.eskom.co.za/xmlvend/service/2.1"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"     xmlns:b="http://www.extended.net/AccountExtensions" 
  xmlns:ns1="http://www.nrs.eskom.co.za/xmlvend/base/2.1/schema"&gt;
        &lt;ns1:clientID xsi:type="ns1:EANDeviceID" ean="4466122376268"/&gt;
        &lt;ns1:serverID xsi:type="ns1:EANDeviceID" ean="6004708001998"/&gt;
        &lt;ns1:terminalID xsi:type="ns1:GenericDeviceID" id="1"/&gt;
        &lt;ns1:reqMsgID dateTime="20140506132252" uniqueNumber="100003"/&gt;
        &lt;ns1:respDateTime&gt;2014-05-20T17:46:21.8611498+02:00&lt;/ns1:respDateTime&gt;
        &lt;ns1:dispHeader&gt;This meter has been blocked&lt;/ns1:dispHeader&gt;
        &lt;ns1:operatorMsg&gt;This meter has been blocked&lt;/ns1:operatorMsg&gt;
        &lt;ns1:custMsg&gt;This meter has been blocked&lt;/ns1:custMsg&gt;
        &lt;ns1:fault xsi:type="ns1:BlockedMeterEx"&gt;
          &lt;ns1:desc&gt;This meter has been blocked&lt;/ns1:desc&gt;
          &lt;/ns1:fault&gt;
          &lt;/xmlvendFaultResp&gt;
       &lt;/detail&gt;
      &lt;/s:Fault&gt;
    &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>and what it should be</p>
  
  <pre><code>&lt;s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns1="http://www.nrs.eskom.co.za/xmlvend/base/2.1/schema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
    &lt;s:Body&gt;
      &lt;s:Fault&gt;
    &lt;faultcode&gt;s:Client&lt;/faultcode&gt;
    &lt;faultstring xml:lang="en-ZA"&gt;This meter has been blocked&lt;/faultstring&gt;
    &lt;detail&gt;
      &lt;ns1:xmlvendFaultResp&gt;
        &lt;ns1:clientID xsi:type="ns1:EANDeviceID" ean="4466122376268"/&gt;
        &lt;ns1:serverID xsi:type="ns1:EANDeviceID" ean="6004708001998"/&gt;
        &lt;ns1:terminalID xsi:type="ns1:GenericDeviceID" id="1"/&gt;
        &lt;ns1:reqMsgID dateTime="20140506132252" uniqueNumber="100003"/&gt;
        &lt;ns1:respDateTime&gt;2014-05-20T17:46:21.8611498+02:00&lt;/ns1:respDateTime&gt;
        &lt;ns1:dispHeader&gt;This meter has been blocked&lt;/ns1:dispHeader&gt;
        &lt;ns1:operatorMsg&gt;This meter has been blocked&lt;/ns1:operatorMsg&gt;
        &lt;ns1:custMsg&gt;This meter has been blocked&lt;/ns1:custMsg&gt;
        &lt;ns1:fault xsi:type="ns1:BlockedMeterEx"&gt;
          &lt;ns1:desc&gt;This meter has been blocked&lt;/ns1:desc&gt;
          &lt;/ns1:fault&gt;
          &lt;/xmlvendFaultResp&gt;
       &lt;/detail&gt;
      &lt;/s:Fault&gt;
    &lt;/s:Body&gt;
  &lt;/s:Envelope&gt;
  </code></pre>
  
  <p>Is it possible and if so how would I be able to do it?</p>