You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by "Avadhanula, Suresh " <SA...@dorado.com> on 2005/04/01 21:44:31 UTC

RE: axis client going through http proxy server... Anyone at all?

I just tried this Axis 1.1 and was able to get it working. We have a
requirement were we can connect to multiple webservices from our
applications and each one of the webservice may or may not have a proxy
headers defined. 
I have implmented my own socket factory that plugs in to Axis easily
using JDK 1.3 service discovery mechanism. All you have to do is have a
class that extends org.apache.axis.components.net.DefaultSocketFactory
and specify it in
META-INF/services/org.apache.axis.components.net.SocketFactory ( as
that's the class it implements).


Having said that your code below should work. I can't think of problem
on top of my head. Axis uses jakarta-commons Discovery service's
ManagedProperties
http://jakarta.apache.org/commons/discovery/commons-discovery-0.2/docs/a
pi/org/apache/commons/discovery/tools/ManagedProperties.html to read
System properties. You might want to take a look ther to find out why
its not being set.

Hope that helps
-Suresh 

-----Original Message-----
From: Adam Landefeld [mailto:alandefeld@corda.com] 
Sent: Thursday, March 31, 2005 2:26 PM
To: axis-user@ws.apache.org
Subject: axis client going through http proxy server... Anyone at all?

Hasn't anyone at all gotten this working with the current release of
axis? I would love to hear from you, anything at all would be very
helpful I am sure :-)

Does Richard Sitze still read/post here? If you do, I think you probably
could point me in the right direction :-)

Thanks again,
-Adam



> Hi all,
> re: trying to get the axis client to communicate through an 
> authenticated http proxy server
>
> For some reason I am not able to set the http proxy credentials 
> correctly for my axis web service client in a java application. The 
> proxy host and port are used correctly.... every time.
>
> I am doing the stuff that worked well in 1.0.. ie:
>
> Properties props= new Properties(System.getProperties());
>         props.put("http.proxySet", "true");
>         props.put("http.proxyHost", "proxy.server.com");
>         props.put("http.proxyPort", "8005");
>         props.put("http.proxyUser", "username");
>         props.put("http.proxyPassword", "password"); 
> System.setProperties(props);
>
> But in 1.1 and 1.2 the user and password are never added to the 
> header. Can someone please, please, please tell me what they have done

> to get around this issue?
>
> I will be indebted forever and forever... this has already consumed a 
> week of my project time.
>
> Thanks in advance!
> -Adam
>


Adam Landefeld
Senior Software Engineer
Corda Technologies
(801) 805-9443
alandefeld@corda.com