Spring WS Logging Soap Messages

You may also like...

Subscribe
Notify of
guest
3 Comments
Oldest
Newest
Inline Feedbacks
View all comments
JeeD
JeeD
November 8, 2016 11:38

Thanks :)
log4j logging works great

Kevin Mandeville
Kevin Mandeville
February 16, 2017 19:52

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

Memorynotfound.com
Memorynotfound.com
February 17, 2017 09:34

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/

3
0
Would love your thoughts, please comment.x
()
x