DefaultHttpClient cl = new DefaultHttpClient();
if (genericLogin != null && !genericLogin.isEmpty()) {
try {
URL url = new URL(genericEntryPoint);
Credentials credentials = new UsernamePasswordCredentials(genericLogin, genericPassword);
cl.getCredentialsProvider().setCredentials(new AuthScope(url.getHost(), url.getPort() > 0 ? url.getPort() : 80, AuthScope.ANY_REALM), credentials);
cl.addRequestInterceptor(new PreemptiveAuth(credentials), 0);
} catch (MalformedURLException ex) {
client = null;
sessionExpirationTime = -1L;
throw new ManifoldCFException("getClient exception: " + ex.getMessage(), ex);