I want to log the webservice requests and responses in the application I'm currently working on.
My approach would be to use AOP and watch the methods you use in your code for logging.
I found "logResponse(MessageContext messageContext)throws IOException" method in the WebServiceTemplate, for that I could create a pointcut.
But I would need something for the request logging as well and now the request logging currently located in the method:
sendRequest(WebServiceConnection connection, WebServiceMessage request) throws IOException
which is also good, just It would be good to separate the logging part imho.
So you could add a similar method to logResponse.
Additional question is that I found that there are so called TracingLogger's creatd with logFactory. Maybe instead of thinking in AOP I could use them with defining my own somehow?
What do you think?
|Field||Original Value||New Value|
|Assignee||Arjen Poutsma [ arjen.poutsma ]|
|Fix Version/s||2.1.2 [ 13606 ]|
|Status||Open [ 1 ]||Resolved [ 5 ]|
|Resolution||Won't Fix [ 2 ]|
|Transition||Time In Source Status||Execution Times||Last Executer||Last Execution Date|
|52d 19h 3m||1||Arjen Poutsma||03/Dec/12 4:38 AM|