SoapUI无法与Fiddler一起用于REST服务测试 [英] SoapUI not working with fiddler for REST service testing

查看:61
本文介绍了SoapUI无法与Fiddler一起用于REST服务测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在SoapUI中创建了一个REST项目,以测试googlemapsapi rest服务(HTTPS).我将SoapUI配置为使用代理设置来设置提琴手(localhost:8888).在提琴手中,启用提琴手工具-> Https下的解密Https流量"选项

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:

请求标头

CONNECT maps.googleapis.com:443 HTTP/1.1客户用户代理:Apache-HttpClient/4.1.1(java1.5)运输连接:保持活动主机:maps.googleapis.com

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

响应标题

HTTP/1.1 200连接已建立

HTTP/1.1 200 Connection Established

其他

FiddlerGateway:直接开始时间:15:45:06.462

FiddlerGateway: Direct StartTime: 15:45:06.462

运输

连接:关闭

握手后,没有进一步的请求和响应发生.

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

没有代理,握手和请求/响应都可以正常工作.

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

注意:我点击了以下链接,将证书添加到SoapUI证书声明和密钥存储中,没有任何运气.

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

推荐答案

这就是我为我完成的工作(在Windows 7上).我将Fiddler的根证书添加到JRE的受信任证书中.

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

导出Fiddler根证书.您可以通过转到工具"/"HTTPS"找到导出按钮.

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

找到运行SoapUI的JRE的文件证书.该文件位于JRE的lib/security下,如果已安装SoapUI,则JRE位于SoapUI的jre文件夹中.将此文件复制到您有权修改它的位置,这样就不必费心提升cmd进程.

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.

现在使用以下命令将Fiddler根证书添加到cacerts密钥库中.

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

keytool -importcert -file FiddlerRoot.cer -keystore cacerts

工具keytool位于JRE的bin文件夹中.cacerts密钥库的密码是"changeit"或"changeme".

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

作为最后一步,将cacerts文件复制回其原始位置,重新启动SoapUI并使用代理乐趣!

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

这篇关于SoapUI无法与Fiddler一起用于REST服务测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆