Hi all,

I need to make a call to a service over a proxy (Sun Proxy) with authentication.

Although this works with apache-commons http client, I am having great difficulty with axis. The best article I have found is this:

http://www.velocityreviews.com/forums/t132514-how-to-call-a-webservice-through-a-proxy-server-with-java-axis.html

With the above, I get a 407 error. The link I gave suggests using the authenticator class, which also gives me the same error. Has this issue been resolved somewhere?

What I have tried is this:

System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", sodiProp.getProxyURL());
System.setProperty("http.proxyPort", sodiProp.getProxyPort());
System.setProperty("http.proxyUser", sodiProp.getProxyUser());
System.setProperty("http.proxyPassword", sodiProp.getProxyPwd());
System.setProperty("http.nonProxyHosts", sodiProp.getNonProxyHosts());
System.setProperty("https.proxySet", "true");
System.setProperty("https.proxyHost", sodiProp.getProxyURL());
System.setProperty("https.proxyPort", sodiProp.getProxyPort());
System.setProperty("https.proxyUser", sodiProp.getProxyUser());
System.setProperty("https.proxyPassword", sodiProp.getProxyPwd());
System.setProperty("https.nonProxyHosts", sodiProp.getNonProxyHosts());

and then the call:

// make service and call
Service  service = new Service();
Call call = (Call) service.createCall();

call.setTargetEndpointAddress( new URL(endPoint) );
call.setSOAPActionURI(soapAction);

Vector elems = (Vector) call.invoke(input);


Cheers,

Markos

Markos Fragkakis
Software Engineer
AGILIS SA - Statistics and Informatics
Acadimias 96-100, 10677 Athens GR
Tel: +30 211 1003310
Fax: +30 211 1003315
e-mail: [email protected]

Reply via email to