title: JAX-WS Client throws SOAPFaultException instead of custom exception
body: <p>I have a JAX-WS based application that I am developing. I generate WSDL from the server using <code>wsgen</code> and then build the client library using <code>wsimport</code>. I am writing my own custom exceptions to throw with my method calls. The code is structured as follows.</p>
  
  <p>Custom Exception Class:</p>
  
  <pre><code>@WebFault(faultBean = "com.mysite.FaultBean")
  public class MyCustomException extends Exception {
    private FaultBean faultInfo;
  
    //Getters/Setters/Constructors...
  }
  </code></pre>
  
  <p>Custom Fault Bean:</p>
  
  <pre><code>public class FaultBean {
    private String message;
    private List&lt;String&gt; messages;
  
    //Getters/Setters/Constructors...
  }
  </code></pre>
  
  <p>I then throw <code>MyCustomException</code> from my methods in my web service endpoint. When I call one of my web service methods and it throws an exception the client is getting a <code>SOAPFaultException</code> instead of <code>MyCustomException</code>. Why is the custom exception not getting used? </p>