Is it possible to redirect a url to another using a webproxy ( such as fiddler )

OscarRyz picture OscarRyz · Jun 13, 2009 · Viewed 8.8k times · Source

I'm trying to parse a WSDL file which is in another server but has hard codded "localhost" all over the document.

When I fetch it, obviously the program complains "connection refused" because nothing is running in my machine.

My question is: Is it possible to use a webproxy ( such as fiddler ) to redirect those localhost request to my other server so the WSDL references are complete?

:-/

Thanks

p.s. I could always have fixed the remote "wsdl" but the guy on charge will be here until next week and I would like to start working today.

Answer

EvilPettingZu42 picture EvilPettingZu42 · Jun 13, 2009

You could use Fiddler as the proxy from your machine, and then have it rewrite the WSDL to change localhost to the correct machine name.

The FiddlerScript CookBook has an example on how to write this sort of script. Go to that page and search for "Remove all DIV tags (and content inside the DIV tag)". Just change the regex to match localhost and set the replace to the machine name you want to use.