Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/308.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用具有摘要身份验证的java客户端使用wcf web服务_Java_Web Services_Wcf - Fatal编程技术网

使用具有摘要身份验证的java客户端使用wcf web服务

使用具有摘要身份验证的java客户端使用wcf web服务,java,web-services,wcf,Java,Web Services,Wcf,使用java客户端和摘要身份验证使用wcf web服务,例如, 我无法识别java与ClientCredentials.HttpDigest.ClientCredential.UserName的等价物 .Net示例 Catalogo.CatalogoWSClient proxy = new Catalogo.CatalogoWSClient(); string user = "usuario"; string pass = "senha"; proxy.ClientCredentials.H

使用java客户端和摘要身份验证使用wcf web服务,例如, 我无法识别java与ClientCredentials.HttpDigest.ClientCredential.UserName的等价物

.Net示例

Catalogo.CatalogoWSClient proxy = new Catalogo.CatalogoWSClient();

string user = "usuario";
string pass = "senha";

proxy.ClientCredentials.HttpDigest.ClientCredential.UserName = user;
proxy.ClientCredentials.HttpDigest.ClientCredential.Password = pass;
proxy.ClientCredentials.UserName.UserName = user;
proxy.ClientCredentials.UserName.Password = pass;

您正在使用哪个Java库?Jaxws((BindingProvider)client.getRequestContext().put(BindingProvider.USERNAME_属性,用户);((BindingProvider)client.getRequestContext().put(BindingProvider.PASSWORD_属性,PASSWD);如果您使用的是标准JDK,我不确定它是否支持摘要身份验证。您可能需要将库切换到ApacheCXF之类的工具