.NET Client Calling the Java HTTPS Web Service

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.

+3
source share
2 answers

In short, Two problems that I had to solve

  • HTTP 401 - HTTP()

    Basic VS, customeBinding app.config

  • HTTP/1.1 505 HTTP-

    : 100-continue SOAP-. ServicePointManager.Expect100Continue = false;. ,

http://www.irasenthil.com/2010/10/wcf-client-to-java-web-service.html

+2

, Java WS , . , , , jsseKeyStorePassword jsseTrustStorePassword.

, .NET Framework 3.0 Windows Communication Foundation.

0

Source: https://habr.com/ru/post/1769605/


All Articles