public void handleMessage(SoapMessage message) {
    if (getInvoker(message).getProtocolHandlers().isEmpty()) {
      return;
    }

    if (getInvoker(message).isOutbound()) {
      if (!chainAlreadyContainsSAAJ(message)) {
        SAAJ_OUT.handleMessage(message);
      }
      message.getInterceptorChain().add(ending);
    } else {
      boolean isFault = handleMessageInternal(message);
      SOAPMessage msg = message.getContent(SOAPMessage.class);
      if (msg != null) {
        XMLStreamReader xmlReader = createXMLStreamReaderFromSOAPMessage(msg);
        message.setContent(XMLStreamReader.class, xmlReader);
        // replace headers
        try {
          SAAJInInterceptor.replaceHeaders(msg, message);
        } catch (SOAPException e) {
          e.printStackTrace();
        }
      }
      if (isFault) {
        Endpoint ep = message.getExchange().get(Endpoint.class);
        message.getInterceptorChain().abort();
        if (ep.getInFaultObserver() != null) {
          ep.getInFaultObserver().onMessage(message);
        }
      }
    }
  }
  public void handleMessage(SoapMessage message) throws Fault {
    SOAPMessage doc = message.getContent(SOAPMessage.class);
    if (doc == null) {
      saajIn.handleMessage(message);
      doc = message.getContent(SOAPMessage.class);
    }

    Map<String, String> headers = toHeadersMap(doc);
    DistributedThreadLocal.putAll(headers);

    DistributedThreadLocal.onReceivedDistributedThreadLocal();
  }