code: private boolean createFault(final MessageContext msgctx,
              final String wsopName, final String exMsg) {
          final String faultstring;
          if (wsopName == null) {
              logger.warn("Sending SOAP fault without endpoint identification for: "
                      + msgctx.getRequest());
              faultstring = exMsg;
          } else {
              faultstring = format(FAULT_STRING_FORMAT, wsopName, exMsg);
          }
  
          logError(wsopName, exMsg);
  
          final SoapMessage response = (SoapMessage) msgctx.getResponse();
          final SoapBody body = response.getSoapBody();
          body.addServerOrReceiverFault(faultstring, Locale.ENGLISH);
          return true;
      }
docs: Create the soap fault and attach to the {@link SoapBody} of the
  {@link SoapMessage soap response}.
  
  @param msgctx {@link MessageContext}, the message context for this
  webservice message
  @param wsopName {@link String}, the webservice operation name, which can
  be <tt>null</tt>
  @param exMsg {@link String}, the endpoint {@link Exception exception}
  message
  @return