axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhao Sharon-CSC002 <Sharon.Z...@motorola.com>
Subject RE: How to make Axis use CommonsHTTPSender?
Date Mon, 29 Mar 2004 13:47:15 GMT
Brian,
  Thank you for all the information.  I am going to try that. You mentioned the changes in
CommonsHTTPSender.java file. Is it possible at the client program level, just call System.setProperty()
(e.g System.setProperty("http.proxyHost", "hostname"), etc) to set the proxy information and
user credentials without changing the CommonsHTTPSender.java file? I think that should work.
 
Sharon Zhao

-----Original Message-----
From: Russell, Brian [mailto:Brian.Russell@mottmac.com] 
Sent: Monday, March 29, 2004 2:59 AM
To: axis-user@ws.apache.org
Subject: RE: How to make Axis use CommonsHTTPSender?


Sharon,

I have been attempting the same thing recently using Axis 1.1. I have found the following.

*	You need to modify the org/apache/axis/client/client-config.wsdd. Change the line
  <transport name="http" pivot="java:org.apache.axis.transport.http.HTTPSender"/> to
  <transport name="http" pivot="java:org.apache.axis.transport.http.CommonsHTTPSender"/>
  You can create a new copy of the wsdd file, and put it in the classpath before the axis.jar(preferred),
or replace the copy in the axis.jar. 

*	I found that I also had to make a couple of changes to the CommonsHTTPSender.java, and rebuild
the source to get NTLM authentication to work.

  After line 131 (getHostConfiguration()), you need to set the configuration into the httpClient.
Add the line

  httpClient.setHostConfiguration(hostConfiguration);

  After line 282 (setProxyCredentials()), I have added the following
  } else {
      // Default to an NTLM credentials.
      Credentials proxyCred =
         new NTCredentials("username","password","","domain");
         client.getState().setProxyCredentials(null,proxyCred);

  I don't consider this a proper solution, since the uesrname,password etc need to be obtained,
rather than hardcoded. It does however prove that axis can use the NTLM authentication using
CommonsHTTPClient. I am looking at
  how I might be able to determine the appropriate information from the currently logged on
user (as happens if you use URLConnection from windows JDK 1.4.2_03), but other tasks are
taking priority at the moment.

Hope this helps.
 
Brian.



-----Original Message-----
From: Zhao Sharon-CSC002 [ <mailto:Sharon.Zhao@motorola.com> mailto:Sharon.Zhao@motorola.com]
Sent: 27 March 2004 04:34
To: 'axis-user@ws.apache.org'
Subject: How to make Axis use CommonsHTTPSender?


Hello,
  Does anyone know if Axis 1.2 use HTTPSender or CommonsHTTPSender? If not, what's the procedure
to have Axis Client use the CommonsHTTPSender? The reason to replace it is to support other
type of enterprise of proxy (not only basic).
 
Thanks,

Sharon Zhao
Motorola Inc.



Mime
View raw message