如何使用 SOAP UI 工具测试 WCF wsHttpBinding 终结点以及证书?



我想使用 SOAP UI 工具测试我的 wcf 服务端点,该工具内置在 wsHttpBinding 中以及 x509 证书身份验证中。它支持基本的HttpBinding并正常工作,但为wsHttpBinding提供错误。任何帮助将不胜感激。我收到以下错误消息作为响应。

<s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing">
<s:Header>
<a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/soap/fault</a:Action>
<a:RelatesTo>uuid:81f1ec47-0bd4-4dd0-b958-648ee934be24</a:RelatesTo>
</s:Header>
<s:Body>
<s:Fault>
<s:Code>
<s:Value>s:Sender</s:Value>
<s:Subcode>
<s:Value xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:InvalidSecurity</s:Value>
</s:Subcode>
</s:Code>
<s:Reason>
<s:Text xml:lang="en-US">An error occurred when verifying security for the message.</s:Text>
</s:Reason>
</s:Fault>
</s:Body>
</s:Envelope>

如果 WCF 服务是由 Wshttpbinding 创建的,并且所需的客户端凭据是证书,我们就能够在 SOAPUI 中测试 WCF 服务。
请参考我几天前写的回复。

基于安全错误,使用 SOAPUI 使用相互证书身份验证测试 WCF。我无法推断服务器端的代码设计。我希望您可以发布有关在服务器端配置的安全绑定和客户端凭据类型的更多详细信息,以便我可以举例说明。 此外,这里有一些链接,希望对您有用。
WCF wsHttpBinding in SoapUI
https://www.soapui.org/docs/functional-testing/sending-https-requests.html
如果有什么我可以帮忙的,请随时告诉我。

最新更新