How to call a webservice (created in java) with ws security, they provided a certificate file , username & password, i tried using Web Services Enhancements (WSE) 3.0, Inherited the service proxy from Microsoft.Web.Services3.WebServicesClientProtocol used username password tocken
UsernameToken tocken = new UsernameToken("uname", "pwd");
Service.RequestSoapContext.Security.Tokens.Add(tocken);
got error "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel."
Is it because of the client certificate ? I aslo tried
X509Certificate xCert = new X509Certificate();
xCert = X509Certificate.CreateFromCertFile("certificate_path.cer");
Service.ClientCertificates.Add(xCert);