title: How to set a faultCode in a SOAPFault?
body: <p>Why can I set a faulString, but can't I set a custom fault code in a SOAPFault? When I throw the exception, the text "Code X" does not appear in the SoapFaultException. Someone could tell me why? Thanks.</p>
  
  <pre><code>SOAPFault soapFault = SOAPFactory.newInstance(SOAPConstants.SOAP_1_1_PROTOCOL).createFault();
  soapFault.setFaultString("String Y")
  soapFault.setFaultCode("Code X");
  
  throw new SOAPFaultException(soapFault);
  </code></pre>