使用公钥证书的 SoapUI Web 服务请求
我有一个 Web 服务的 WSDL 和一个 .cer 文件形式的公钥证书。
我需要让 SoapUI 使用证书的公钥加密服务请求。
我该怎么做?
I have a WSDL for a Web Service and a Public Key Certificate in the shape of a .cer file.
I need to get SoapUI to encrypt the service request with the public key of the certificate.
How do I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
在 SoapUI 中,转到“文件”菜单下的“首选项”对话框。有一个用于 SSL 的选项卡/部分。您可以在此处指定 .cer 文件的路径。我面前没有它,而且我只完成了 .pfx,但它应该工作相同。对于 .pfx,您需要输入密码 - 不确定是否对 .cer 这样做。如果效果更好,您还可以将 .cer 转换为 .pfx。但无论如何,通过此处指定的 .pfx,我能够使用 https 连接到我们的服务器(实际上是 Cisco ACE 网关),这需要“客户端证书身份验证”。在 SoapUI 中很容易做到,证明基础设施设置正确。我们的应用程序是用 Delphi2005 编写的,又花了 3 周的时间……但至少我们知道我们要做什么,并且有办法验证结果。
In SoapUI, go to the Preferences dialog, under the File menu. There's a tab/section for SSL. There you can specify the path to the .cer file. I don't have it here in front of me, and I've only done .pfx, but it should work the same. With .pfx, you need to enter the password - not sure if you do that for .cer or not. You can also convert the .cer to .pfx if that works better. But anyway, with a .pfx specified here, I was able to use https connections to our server (Cisco ACE gateway actually) which required "client certificate authentication". It was easy to do in SoapUI, proving that the infrastructure was set up right. Our app, written in Delphi2005, took another 3 weeks... But at least we knew what we were trying to do, and had a way to verify the result.
在首选项中,在密钥库字段中填写证书的路径以及下面的密码。
我使用 p12 证书,它似乎工作正常。
In Preferences fill in the path to your certificate in the KeyStore field and the password underneath.
I use a p12 certificate and it seems to be working fine.
如果您可以使用 WCF,只需向绑定添加安全性以及以下行为:
有关如何在 WCF 中启用安全性的详细信息,请参阅:MSDN
If you can use WCF, just add security to the binding, and the following behavior:
More info about how to enable security in WCF, see: MSDN