Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using fiddler with Java and Eclipse

I'm trying to hook up fiddler to a java unit test in Eclipse so I can see the soap request when our web service is being called...It works automatically in our .NET harness but is there some setting that needs to be applied for Java? Thanks

like image 990
Dr.Bunny Avatar asked Sep 15 '11 15:09

Dr.Bunny


1 Answers

I have not tried this, but ...

Fiddler establishes itself as a proxy server, listening on localhost:8888

You can configure Java to use a proxy server with the http.proxyHost and http.proxyPort (see http://download.oracle.com/javase/6/docs/technotes/guides/net/proxies.html).

So, if you go into Eclipse and set the "VM" arguments to the following, it should route all traffic through Fiddler (which, of course, must be already running):

-Dhttp.proxyHost=localhost
-Dhttp.proxyPort=8888

This assumes that your application is using URLConnection. If it's using Apache HttpClient or some other library, you may need to check the documentation for that library.

like image 166
parsifal Avatar answered Sep 23 '22 19:09

parsifal