I have a java service that communicates over https. I want to connect to this service with C #.
I get this exception:
System.ServiceModel.FaultException: WSDoAllReceiver: The incoming message does not contain the required security header.
Does anyone know what is wrong?
C # code:
EndpointAddress address = new EndpointAddress(
new Uri("https://JavaStore:8443/JavaStore/services/B2BService"),
EndpointIdentity.CreateDnsIdentity("JavaStore"),
new AddressHeaderCollection()
);
BasicHttpBinding binding = new BasicHttpBinding();
binding.Security.Mode = BasicHttpSecurityMode.Transport;
var client = new ReharB2BService.B2BServicePortTypeClient(binding, address);;
client.Open();
client.getAllItems();
source
share