2011-09-20 3 views
4

선점 인증이 필요한 이유는 무엇입니까?선점 인증 이유

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

자바에서 웹 서비스 액세스 클라이언트 프로그램을 작성했습니다. 우리가 호출 객체에서 사용자 이름과 암호를 설정하는 곳에서 완벽하게 작동했습니다.

최근에, 우리의 서비스 제공자는 그들의 편에서 약간의 변화를 만들어 그들이 이름 & passwod를 수신하지 않은 것처럼 그 후 그들은 우리가 그 (공급자)에 연결할 수 없었던 웹 서비스 호출에 이름 & 암호를 수신하지 않았다 서비스.

그럼 내가 인터넷 검색을하고 선매 인증에 대해 발견했습니다. 웹 서비스를 호출하는 동안 "httpclient.authentication.preemptive"를 "true"로 설정합니다. - System.setProperty ("httpclient.authentication.preemptive", "true"); , 우리는 서비스 제공 업체로부터 응답을받을 수 있습니다.

System.setProperty ("httpclient.authentication.preemptive", "true")를 제거 할 때; 그때 우리는 그들의 서비스에 연결할 수 없습니다.

답변

1

우리는 전송 피봇 = "자바 : org.apache.axis.transport.http.HTTPSender"변경되면 전송에 피봇 = "자바 : org.apache.axis.transport.http.CommonsHTTPSender를" client-config.wsdd 파일에 있습니다. 이 문제는 System.setProperty ("httpclient.authentication.preemptive", "true")를 설정하지 않고 해결되었습니다. .

클라이언트 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>