title: Error message while connecting to URL using HTMLUnit
body: <p>I am using HTMLUnit in Java to connect to a remote URL and derive some information from the web page obtained.</p>
  
  <p>I am using the following code:</p>
  
  <pre><code>final WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_6_0, "companyproxy.server", 8080);
  final DefaultCredentialsProvider scp = new DefaultCredentialsProvider();
  scp.addProxyCredentials("username", "password","companyproxy.server",8080);
  webClient.setCredentialsProvider(scp);
  
  final URL url = new URL("http://htmlunit.sourceforge.net");
  final HtmlPage page = (HtmlPage)webClient.getPage(url);
  System.out.println(page.asXml());
  </code></pre>
  
  <p><strong>After providing details for the proxy server I am getting this error message:</strong></p>
  
  <pre><code>SEVERE: Credentials cannot be used for NTLM authentication:
  org.apache.commons.httpclient.UsernamePasswordCredentials
  org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
      at org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:332)
      at org.apache.commons.httpclient.HttpMethodDirector.authenticateProxy(HttpMethodDirector.java:320)
      at org.apache.commons.httpclient.HttpMethodDirector.authenticate(HttpMethodDirector.java:232)
      at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
      at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:97)
      at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1477)
      at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1435)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:327)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:388)
      at com.test.Test.main(Test.java:25)
  Jun 5, 2009 9:28:35 AM org.apache.commons.httpclient.HttpMethodDirector processProxyAuthChallenge
  INFO: Failure authenticating with NTLM &lt;any realm&gt;@companyproxy.server:8080
  Jun 5, 2009 9:28:35 AM com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary
  INFO: statusCode=[407] contentType=[text/html]
  Jun 5, 2009 9:28:35 AM com.gargoylesoftware.htmlunit.WebClient printContentIfNecessary
  INFO: &lt;HTML&gt;&lt;HEAD&gt;
  &lt;TITLE&gt;Access Denied&lt;/TITLE&gt;
  &lt;/HEAD&gt;
  </code></pre>
  
  <p>....</p>
  
  <pre><code>Exception in thread "main" com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException:
  
  407 Proxy Authentication Required for http://htmlunit.sourceforge.net/
      at com.gargoylesoftware.htmlunit.WebClient.throwFailingHttpStatusCodeExceptionIfNecessary(WebClient.java:535)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:332)
      at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:388)
      at com.test.Test.main(Test.java:25)
  </code></pre>
  
  <p>Can you please provide some info on this ?</p>