title: Handling SOAP FaultException
body: <p>I have problem catching SOAP <code>FaultException</code>.</p>
  
  <p>The server response is:</p>
  
  <pre><code>&lt;soap-env:Fault xmlns:soap-env = "http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://schemas.xmlsoap.org/soap/envelope/"&gt;
       &lt;faultcode&gt;soap-env:Client&lt;/faultcode&gt;
       &lt;faultstring&gt;Test&lt;/faultstring&gt;
       &lt;detail&gt;
              &lt;brin:FaultResponse&gt;
             &lt;cdm:SingleError&gt;
          &lt;cdm:ErrorCode&gt;-1&lt;/cdm:ErrorCode&gt;
          &lt;cdm:ErrorDetails&gt;Custom detail&lt;/cdm:ErrorDetails&gt;
            &lt;/cdm:SingleError&gt;
            &lt;/brin:FaultResponse&gt;
       &lt;/detail&gt;
  &lt;/soap-env:Fault&gt;
  </code></pre>
  
  <p>In .NET code I have following try catch block:</p>
  
  <pre><code>try
  {
     //call client
  }
  catch(FaultException faultException)
  {
  
  }
  catch (Exception ex)
  {
        //Always get here - with type of Exception == CommunicationException
  }
  </code></pre>