从.net桌面应用程序调用安全的Java Web服务 [英] Call secure java web service from .net desktop application

查看:71
本文介绍了从.net桌面应用程序调用安全的Java Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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.





我有什么试过:



我试图实现这个但是没有成功,即使我无法找到使用桌面应用程序的Web服务。我得到了一些WCF服务的参考,并尝试使用Web服务,但它不起作用。



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.

推荐答案

您将不得不改变服务的http绑定例如



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;


这篇关于从.net桌面应用程序调用安全的Java Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆