Webservice管理员给了我WSDL,两个证书和一个私钥:
service.wsdl
ssl.cer
auth_cert.pem
auth_private_key.pem
Run Code Online (Sandbox Code Playgroud)
在Visual Studio 2010中,我从WSDL添加了Web引用(服务引用不起作用).然后我尝试使用它,因为它是一个http soap客户端:
MySoapClient client = new MySoapClient();
client.Operation();
Run Code Online (Sandbox Code Playgroud)
我获得了这个堆栈跟踪:
Unhandled Exception: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel.
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.HttpWebClientProtocol.GetWebResponse(WebRequest request)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
Run Code Online (Sandbox Code Playgroud)
我与证书和私钥有什么关系?
我找不到任何在线教程,也没有涉及此事的书籍.任何提示?
更新
使用Firefox访问端点:
SSL对等方无法验证您的证书.(错误代码:ssl_error_bad_cert_alert)