I have a Java HTTPS web service, I am trying to access a web service using .NET [client client / WCF client .NET 2.0]. I am returning this error from WS.
"HTTP Status 401 - HTTP () authentication is required for this request."
How to find out what security WS has? Besides SSL, I have a username and password to send it to WS, I believe that this is part of message authentication.
The Java client seems to be successful, and it has some interesting lines,
System.setProperty("javax.net.ssl.keyStorePassword", new String(jsseKeyStorePassword));
System.setProperty("javax.net.ssl.trustStorePassword", new String(jsseTrustStorePassword));
----------------------------------------------
BindingProvider bindingProvider = (BindingProvider) port;
bindingProvider.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, username);
bindingProvider.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, new String(password));
I would be grateful for any help.
source
share