Spring WS Logging Soap Messages

You may also like...

  • JeeD

    Thanks :)
    log4j logging works great

  • Kevin Mandeville

    Any idea how to get it to log the HTTP headers as well?

    • Hi Kevin,

      For as far I know, Spring WS does not have any default interceptor configured to log the HTTP Headers, only the soap request and/or response body.
      You can however, write your own interceptor based on the PayloadLoggingInterceptor from Spring WS. Using an interceptor on the client or on the server, you can inspect the entire message. And are able to write the message to a log file.

      You can find how to write a custom interceptor here: http://memorynotfound.com/spring-ws-intercept-request-response-soap-messages/