I would also like to know how to connect jboss through a proxy that requires authentication.
I have tried
java.net.Authenticator.setDefault(new ProxyAuthenticator("user", "pass"));
System.setProperty("http.proxySet", "true");
System.setProperty("http.proxyHost", "proxy");
System.setProperty("http.proxyPort", "8080");
with this authenticator
import java.net.PasswordAuthentication;
public class ProxyAuthenticator extends java.net.Authenticator{
private String user, password;
public ProxyAuthenticator(String user, String password) {
this.user = user;
this.password = password;
}
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(user, password.toCharArray());
}
}
and I receoive a HTTP 407 proxyauthentication error.
The reason I need to do this is to access an external webservice from within a jboss app.