title: Updating SOAP 1.2 fault "code value" and "locale"?
body: <p>I have set a custom WebFault exception as follows:</p>
  
  <pre><code>@WebFault(name="WSFault", targetNamespace = "http://www.example.com/")
  public class WSException extends Exception {
  
      private static final long serialVersionUID = -6647544772732631047L;
      private WSFault fault;
  </code></pre>
  
  <p>and I am getting the below fault XML when throwing my custom exception at the level of the endpoint : <code>throw new WSException("1234","My Service Error");</code>:</p>
  
  <pre><code>&lt;S:Fault xmlns:ns4="http://schemas.xmlsoap.org/soap/envelope/"&gt;
           &lt;S:Code&gt;
              &lt;S:Value&gt;S:Receiver&lt;/S:Value&gt;
           &lt;/S:Code&gt;
           &lt;S:Reason&gt;
              &lt;S:Text xml:lang="en"&gt;My Service Error&lt;/S:Text&gt;
           &lt;/S:Reason&gt;
           &lt;S:Detail&gt;
              &lt;ns2:WSFault xmlns:ns2="http://www.example.com/"&gt;
                 &lt;faultCode&gt;1234&lt;/faultCode&gt;
                 &lt;faultString&gt;My Service Error&lt;/faultString&gt;
              &lt;/ns2:WSFault&gt;
           &lt;/S:Detail&gt;
        &lt;/S:Fault&gt;
  </code></pre>
  
  <p>I want to control the <code>xml:lang</code> value in the <code>Text</code> tag to allow specifiying the language of the error message sent as well as the code value <code>&lt;S:Value&gt;</code>. Is there a way to do this with <code>@WebFault</code>?</p>