preemptive认证为什么 [英] preemptive authentication why

查看:735
本文介绍了preemptive认证为什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么需要preemptive认证?

Why preemptive authentication required ?

System.setProperty(httpclient.authentication preemptive。,真);

System.setProperty("httpclient.authentication.preemptive", "true");

我已经用Java编写的Web服务访问客户端程序。我们在那里呼叫对象设置的用户名和密码,这是完美的工作。

I had written web services access client program in java. Where we were setting username and password in call object and that was working perfectly.

近日,我们的服务提供商做出自己身边的一些变化后,他们没有收到用户名和放大器;密码Web服务调用和,因为他们没有收到用户名和放大器; passwod所以我们无法连接到他们(供应商)的服务。

Recently, our service provider made some changes at their side and after that they were not receiving username & password in web service call and as they were not receiving username & passwod so we were not able to connect to their (provider) service.

然后我做了谷歌搜索,发现约preemptive认证。
当调用Web服务,我们将httpclient.authentication preemptive。作为真 - System.setProperty(真,httpclient.authentication preemptive。); ,那么我们就能够从我们的服务提供商接收响应。

Then i did googling and found about preemptive authentication. While calling web services we set "httpclient.authentication.preemptive" as "true" - System.setProperty("httpclient.authentication.preemptive", "true"); , then we are able to receive responses from our service provider.

当我们删除System.setProperty(httpclient.authentication preemptive,真);线话我们是不是能够连接到他们的服务。

When we remove System.setProperty("httpclient.authentication.preemptive", "true"); line then we are not able to connect to their services.

推荐答案

当我们改变交通枢纽=的java:org.apache.axis.transport.http.HTTPSender 交通枢纽=的java:org.apache.axis.transport.http.CommonsHTTPSender 的客户端 - config.wsdd文件。这个问题得到了解决设置内部消除Sys​​tem.setProperty(httpclient.authentication preemptive,真);

When we changed transport pivot="java:org.apache.axis.transport.http.HTTPSender" to transport pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" in client-config.wsdd file. This issue got resolved whithout setting System.setProperty("httpclient.authentication.preemptive", "true"); .

客户config.wsdd中 -

client-config.wsdd -

<?xml version="1.0" encoding="UTF-8"?> 
<deployment 
    name="commonsHTTPConfig" 
    xmlns="http://xml.apache.org/axis/wsdd/" 
    xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

  <!-- use CommonsHTTPSender instead of the default HTTPSender -->
  <transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender" />  

  <transport name="local" pivot = "java:org.apache.axis.transport.local.LocalSender" /> 
  <transport name="java" pivot="java:org.apache.axis.transport.java.JavaSender" /> 
</deployment>

这篇关于preemptive认证为什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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