How to intercept xml response and request during web service invocation? [closed]
Question
I wonder if there is some neat way to intercept xml request send during java webservice method invocation and xml given in response? I don't want to print those xmls to standard output but to "catch" them in some string.
Solution
Yes, normally you use a soap proxy like soapUI. Simply point your webservice client at the proxy and the proxy at the real service.
OTHER TIPS
Fiddler or SoapUI will let you see and even CHANGE the request/response in route.
Yes, you can use a packet sniffer and see what's in your traffic.
I have never got that far.
What I have used is a very simple home made protocol, that reads all the input, print it and re-send all the info.
Tool to monitor HTTP, TCP, etc. Web Service traffic may be useful.
If you can deploy servlets on the server providing the web service you might consider writing and deploying a simple Filter. You can use this to log both the inbound and the outbound traffic.