Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to trace SOAP requests that are being sent by webServiceTemplate

I know it is possible to use Eclipse TCP/IP monitoring to trace SOAP messages. I tried that but it is not able to monitor my localhost. TCP/IP does not show the localhost in its console.

I can access the application through http://localhost:8080/MyApp/ In TCP/IP configuration I have following

Local monitoring port 9090 (a random port that I have chosen)
Host name: localhost
Port: 8080
Type: TCP/IP
Timeout:0

Is there any way to solve the issue with TCP/IP or find any alternative software?

like image 646
Jack Avatar asked Aug 25 '15 10:08

Jack


1 Answers

EDIT: Wireshark is one of the most comprehensive software for this (but its a little involved)

I have used, Fiddler and Charlesproxy, for the same - WebSvcs, Rest, SOAP (after having failed miserably in Eclipse tools). Both of them, are much superior to eclipse and very easy to use.

Here is the way you setup fiddler-

  1. Download and start fiddler.
  2. Add following VM Options in Eclipse preferences

    DproxySet=true -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8888

  3. Optionally, you may also setup programatically

    System.setProperty("http.proxyHost", "127.0.0.1"); System.setProperty("https.proxyHost", "127.0.0.1"); System.setProperty("http.proxyPort", "8888"); System.setProperty("https.proxyPort", "8888");

  4. Restart your application.(I never needed to restart eclipse itself, but eclipse, sometime has a mind of its own)

Thats it, this is the most common and basic setup, useful for 90% of usecases, I have dealt with. Note: Fiddler listens by default on 8888 port.

There is further setup, if your server uses SSL/certs. Here is the link to full documentation.

Note: There is much content, even on stackoverflow on these setup, should you get stuck.

Also, Charlesproxy is also really good, but I have personally used fiddler mostly for Webservice client development.

like image 174
eXc Avatar answered Oct 19 '22 22:10

eXc