Click here to Skip to main content
15,902,276 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
We like to call a secured Java Web Service from a .Net desktop application. The authentication method is implemented in the web service is Kerberos.  What code/configuration we need to implement in desk top application to consume the secured Java Webservice here? Do we need to pass Kerberos token in the SOAP header. If yes, how?

I had to use Web reference in place of Service Reference and the exposed web service is not using WebMethods.


What I have tried:

I tried to implement this but not succeed even I am not able to find use web service with desktop application. I got some reference with WCF service and tried same thing with Web service, but it doesn't work.
Posted
Updated 4-Mar-16 4:28am

1 solution

You will have to alter the http binding of your service such as

  httpBinding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Ntlm;
httpBinding.Security.Message.ClientCredentialType = BasicHttpMessageCredentialType.UserName;


Then add username password

Service.ClientCredentials.UserName.UserName = username;
Service.ClientCredentials.UserName.Password = password;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900