WCF 服务 soapUI 问题

WCF service soapUI issue

我创建了一个 WCF Web 服务,该服务使用 wshttbinding,当我尝试通过添加服务引用(提供证书)进行调用时工作正常。当我尝试从 soapUI 调用它时出现错误。我尝试禁用安全模式,但发现是以下代码行导致了问题。

string certInfo = OperationContext.Current.ServiceSecurityContext.PrimaryIdentity.Name;

我得到的以上值为空。有什么办法可以从 soapUI

中传递这个上下文

在 soapUI 中,您需要指定 Outgoing WSS,它指定要应用于传出请求的项目级传出 WS-Security 配置。

以下链接应提供足够的背景信息:
http://www.soapui.org/SOAP-and-WSDL/applying-ws-security.html
http://www.soapui.org/SOAP-and-WSDL/authenticating-soap-requests.html