code: protected void logRequest(String logMessage, MessageContext messageContext, boolean incoming) throws TransformerException {
          if (messageContext.getRequest() instanceof SoapMessage) {
              logSoapMessage(logMessage, (SoapMessage) messageContext.getRequest(), incoming);
          } else {
              logWebServiceMessage(logMessage, messageContext.getRequest(), incoming);
          }
      }
docs: Logs request message from message context. SOAP messages get logged with envelope transformation
  other messages with serialization.
  
  @param logMessage
  @param messageContext
  @param incoming
  @throws TransformerException