code: protected String createSoapFaultResponse(String soapVersion, String code, String message)
              throws SOAPException, TransformerException {
  
          SOAPMessage soapMessage = getSoapMessageFactory(soapVersion).createMessage();
          SOAPBody soapBody = soapMessage.getSOAPBody();
          /**
           * Faults are treated differently for 1.1 and 1.2 For 1.2 you can't use
           * the elementName otherwise it throws an exception
           *
           * @see http://docs.oracle.com/cd/E19159-01/819-3669/bnbip/index.html
           */
          SOAPFault fault = null;
          if (soapVersion.equals(SOAPConstants.SOAP_1_1_PROTOCOL)) {
              // existing 1.1 functionality
              fault = soapBody.addFault(soapMessage.getSOAPHeader().getElementName(), message);
              if (code != null)
                  fault.setFaultCode(code);
          }
          else if (soapVersion.equals(SOAPConstants.SOAP_1_2_PROTOCOL)) {
              /**
               * For 1.2 there are only a set number of allowed codes, so we can't
               * just use any one like what we did in 1.1. The recommended one to
               * use is SOAPConstants.SOAP_RECEIVER_FAULT
               */
              fault = soapBody.addFault(SOAPConstants.SOAP_RECEIVER_FAULT,
                      code == null ? message : code + " : " + message);
  
          }
          return DomHelper.toXml(soapMessage.getSOAPPart().getDocumentElement());
  
      }
docs: Allow version specific factory passed in to support SOAP 1.1 and 1.2
  <b>Important</b> Faults are treated differently for 1.1 and 1.2 For 1.2
  you can't use the elementName otherwise it throws an exception
  
  @see http://docs.oracle.com/cd/E19159-01/819-3669/bnbip/index.html
  
  @param factory
  @param code
  @param message
  @return Xml fault string
  @throws SOAPException
  @throws TransformerException