Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SoapUI not working with fiddler for REST service testing

Tags:

fiddler

soapui

I created a REST project in the SoapUI to test the googlemapsapi rest service (HTTPS). I configured the SoapUI to use the proxy settings to fiddler (localhost:8888). In fiddler, enabled the "Decrypt Https Traffic" option under Fiddler Tools -> Https

When i send the request, the handshake is successful. Below is the request and response headers:

Request Headers

CONNECT maps.googleapis.com:443 HTTP/1.1 Client User-Agent: Apache-HttpClient/4.1.1 (java1.5) Transport Connection: Keep-Alive Host: maps.googleapis.com

Response Headers

HTTP/1.1 200 Connection Established

Miscellaneous

FiddlerGateway: Direct StartTime: 15:45:06.462

Transport

Connection: close

After the handshake, no further request and response is happening.

Without the proxy, the handshake and request/response works fine.

Note: I followed the below links to add the certificate to the SoapUI certificate assert and key store with no luck.

http://geekswithblogs.net/gvdmaaden/archive/2011/02/24/how-to-configure-soapui-with-client-certificate-authentication.aspx

http://qatesterblog.blogspot.com/2013/10/how-to-make-soapui-ssl-compatible.html

like image 333
user555400 Avatar asked Mar 21 '14 20:03

user555400


People also ask

Can SoapUI be used to test REST service?

SoapUI supports extensive testing of RESTful web services and their resources, representations, and so on. This step-by-step tutorial will help you learn how to send requests to a REST API and verify its responses with assertions in SoapUI.

How do I capture a SoapUI request in Fiddler?

On SOAP UI, this is pretty simple. Go to File > Preferences > Proxy Settings, and type in Host=localhost and Port=8888, which is what Fiddler uses as its default. Click OK, and you're all done! Try sending a WS request and you can see the trace in Fiddler now.

How do I create a REST API in SoapUI?

Create REST Service at run time in a SoapUI Step 1: Right-click on the REST Project 1, and then select the New Rest Service from URI. As we click on the New Rest Service from URI, it shows a pop-up dialog box to enter the REST URI. Here is the REST URI for getting the country by name.


1 Answers

This is how I made this work for me (on Windows 7). I added Fiddler's root certificate to the JRE's trusted certificates.

Export the Fiddler root certificate. You find the export button by going to Tools / HTTPS.

Locate the file cacerts of the JRE you run SoapUI with. The file is located under lib/security of the JRE and the JRE is in SoapUI's jre folder if you have installed SoapUI. Copy this file to somewhere you have rights to modify it so that you don't have to fiddle with elevating the cmd process.

Now add the Fiddler root certificate to the cacerts keystore with the following command.

keytool -importcert -file FiddlerRoot.cer -keystore cacerts

The tool keytool is located in the bin folder of the JRE. The password the the cacerts keystore is "changeit" or "changeme".

As a final step copy back the cacerts file to it original location, restart SoapUI and have fun with the proxy!

like image 200
Joel Jonsson Avatar answered Sep 28 '22 01:09

Joel Jonsson