/set Proxy Config
client.getHostConfiguration().setProxy(prosyUrl, proxyPort);
//We want Basic Authentication, this will exclude the NTLM authentication scheme
List authPrefs = new ArrayList();
authPrefs.add(AuthPolicy.BASIC);
client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, authPrefs);
//authenticate
HttpState state = new HttpState();
Credentials credentials = new UsernamePasswordCredentials (user, pwd);
state.setProxyCredentials(AuthScope.ANY,credentials);
client.setState(state);