Spring WS Logging Soap Messages

You may also like...

Leave a Reply

3 Comments on "Spring WS Logging Soap Messages"

avatar
  Subscribe  
newest oldest
Notify of
JeeD
Guest
JeeD

Thanks :)
log4j logging works great

Kevin Mandeville
Guest
Kevin Mandeville

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

Memorynotfound.com
Guest
Memorynotfound.com

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/