title: SoapEnvelopeLoggingInterceptor: how log client remote URL
body: <p>I have a custom <code>SoapEnvelopeLoggingInterceptor</code> to log the soap envelope of the ws service calls using a transformer.<br>
  Is there a way to log the remote URL of the call in this class? (ex. ip address)<br>
  The best is to manipulate something like HttpServletRequest.</p>
  
  <p>In context I have:</p>
  
  <pre><code>&lt;sws:interceptors&gt;
      &lt;bean id="envelopeLoggingInterceptor" class="path.to.my.CustomSoapEnvelopeLoggingInterceptor"&gt;
          &lt;property name="loggerName" value="myLogger" /&gt;
          &lt;property name="logRequest" value="true" /&gt;
          &lt;property name="logResponse" value="true" /&gt;
          &lt;property name="logFault" value="true" /&gt;
      &lt;/bean&gt;
  &lt;/sws:interceptors&gt;
  </code></pre>
  
  <p>My <code>CustomSoapEnvelopeLoggingInterceptor</code>:</p>
  
  <pre><code>public class CustomSoapEnvelopeLoggingInterceptor extends SoapEnvelopeLoggingInterceptor {
      @Override
      protected void logMessageSource(String message, Source source) throws TransformerException {
          if (source != null){
              Transformer trf = this.getTransformerFactory().newTransformer();
              trf.setOutputProperty(OutputKeys.INDENT, "yes");
              trf.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4");
  
              StringWriter writer = new StringWriter();
              StreamResult stream = new StreamResult(writer);
              trf.transform(source, stream);
              writer.flush();
  
              this.logger.debug(message + stream.getWriter().toString());
          }
      }
  }
  </code></pre>