如何调用部署在SSL下的Web Services
java:
In my recent experience, this error appears when there is a problem with the trustStore or trustStorePassword. Make sure you have separate keyStore and trustStore files that contain the expected certificates and signers. And make sure you have set the following system properties correctly:
System.setProperty("javax.net.ssl.trustStore", <path to trustStore file> );
System.setProperty("javax.net.ssl.trustStorePassword", <password> );
System.setProperty("javax.net.ssl.keyStore", <path to keyStore file> );
System.setProperty("javax.net.ssl.keyStorePassword", <password> );
.Net
Dim ws As New TestWS.MyWebservice.Hello() '-- instantiate the web service
ws.Credentials = CredentialCache.DefaultCredentials '-- Pass in
credentials
Dim x509 As X509Certificate =
X509Certificate.CreateFromCertFile("c:\HelloWs.cer") '-- Load the
certificate from a file
ws.ClientCertificates.Add(x509) '-- add the certificate
ws.HelloWorld '-- call the web method
http://www.15seconds.com/issue/031124.htm
http://topic.csdn.net/t/20040801/11/3231246.html
In my recent experience, this error appears when there is a problem with the trustStore or trustStorePassword. Make sure you have separate keyStore and trustStore files that contain the expected certificates and signers. And make sure you have set the following system properties correctly:
System.setProperty("javax.net.ssl.trustStore", <path to trustStore file> );
System.setProperty("javax.net.ssl.trustStorePassword", <password> );
System.setProperty("javax.net.ssl.keyStore", <path to keyStore file> );
System.setProperty("javax.net.ssl.keyStorePassword", <password> );
.Net
Dim ws As New TestWS.MyWebservice.Hello() '-- instantiate the web service
ws.Credentials = CredentialCache.DefaultCredentials '-- Pass in
credentials
Dim x509 As X509Certificate =
X509Certificate.CreateFromCertFile("c:\HelloWs.cer") '-- Load the
certificate from a file
ws.ClientCertificates.Add(x509) '-- add the certificate
ws.HelloWorld '-- call the web method
http://www.15seconds.com/issue/031124.htm
http://topic.csdn.net/t/20040801/11/3231246.html