Answer the question
In order to leave comments, you need to log in
How to set WSS-PasswordType for SOAP client?
Good afternoon!
I'm trying to connect to a web service running on soap. wsSecurity is enabled on the server.
I do
BasicHttpBinding binding = new BasicHttpBinding();
binding.SendTimeout = TimeSpan.FromSeconds(25);
binding.Security.Mode = System.ServiceModel.BasicHttpSecurityMode.TransportCredentialOnly;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Digest;
binding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;
EndpointAddress address = new EndpointAddress("http://....");
Service.Providers client = new Service.Providers(binding, address);
var rsp = client.sendXML();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question