40

I am trying to route my soapUI web service requests via fiddler, but it doesn't seems to work. I tried url's like

http://localhost./myservice/myservice.asmx
http://localhost:8888/myservice/myservice.asmx

The later one though goes via fiddler, but it returns the request itself rather than the response from webservice. Any help?

Ashish
  • 2,544
  • 6
  • 37
  • 53

5 Answers5

76

Try File > Preferences > Proxy Settings Host 127.0.0.1 Port 8888

and use http://localhost/myservice/myservice.asmx

Here is a post that explain this a little bit more

Retsam
  • 30,909
  • 11
  • 68
  • 90
mikesl
  • 2,133
  • 20
  • 25
  • Thanks a lot. It works. I just had to set the proxy settings after adding the wsdl to soapUI project. – Ashish Sep 25 '10 at 12:07
10

To decrypt HTTPS traffic generated by SoapUI, you may need to import Fiddler certificate into the Java truststore file, cacerts. For SoapUI this file is typically located in "C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\jre\lib\security\" (or whatever version and path you installed it at).

  1. In Fiddler, export the root certificate to your desktop: Tools > Fiddler Options... > HTTPS > Export Root Certificate to Desktop.

  2. Run cmd as administrator.

  3. cd to the security folder of SoapUI's JRE, e.g.:

    cd "C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\jre\lib\security\"
    
  4. Back up the cacerts file:

     xcopy cacerts cacerts.bak
    
  5. Import Fiddler certificate:

     ..\..\bin\keytool.exe -import -alias fiddler -file "C:\Users\<username>\Desktop\FiddlerRoot.cer" -keystore cacerts -storepass changeit    
    

    Here "changeit" is the password to the cacerts store.

  6. When prompted to trust the certificate, enter yes.

  7. Restart SoapUI.

  1. Configure SoapUI to use Fiddler as proxy: go to File > Preferences > Proxy Settings and specify:

    • Proxy Setting: Manual
    • Host: localhost
    • Port: 8888 (or whatever port your Fiddler uses)

Remember to restore the original proxy settings when Fiddler is not running.

David Noreña
  • 3,951
  • 1
  • 28
  • 43
Sireesh Yarlagadda
  • 12,978
  • 3
  • 74
  • 76
3

Fiddler injects itself automatically as a proxy, but only into the IE stack. SoapUI uses a java stack, so the proxy isn't automatic.

Chris Thornton
  • 15,620
  • 5
  • 37
  • 62
3

Sometimes it happens that default port 8888 is used by some other application. Like in my case it was python so it did not worked using 8888

So the port number you mention should be the one where Fiddler is listening.

capture snapshots so its easy to understand

Step 1 & Step 2 to be performed on Fiddler
Step 3 & Step 4 on Soapui/ReadyaPI

enter image description here

Gaurav Khurana
  • 3,423
  • 2
  • 29
  • 38
0

Have you tried:

http://localhost/myservice/myservice.asmx (without the dot)

UPDATE

Fiddler works by acting as a proxy on your machine. When started it will set itself up on port 8888. That's why you're seeing it work when you use localhost:8888. If you want to use localhost then you'll need to tell fiddler to look at port 80.

From the Internet Explorer main menu, click Tools, click Internet Options, click Connections, click LAN Setting, and finally click Advanced. Now change the port to 80 and see if that works.

Naeem Sarfraz
  • 7,360
  • 5
  • 37
  • 63
  • All other requests that are fired from browser are going via fiddler. But the requests that are made from soapUI are not getting routed through fiddler. Do you think we need to make any changes to soapUI options? – Ashish Sep 19 '10 at 08:30
  • What's the url you're using with SoapUI? Is it `localhost`? – Naeem Sarfraz Sep 19 '10 at 19:54
  • I tried the below three http://localhost/myservice/myservice.asmx http://localhost./myservice/myservice.asmx http://localhost:8888/myservice/myservice.asmx – Ashish Sep 20 '10 at 03:10