try {
if (config.getNtlmDomain() != null && !config.getNtlmDomain().equals("")) {
// need to send a HEAD request to trigger NTLM authentication
HttpHead head = new HttpHead("http://salesforce.com");
client.execute(head);
head.releaseConnection();
}
HttpResponse response = client.execute(post);
if (response.getStatusLine().getStatusCode() > 399) {
successful = false;