我正在用 Java 开发一个应用程序来从 Exchange 服务器(版本 10)获取电子邮件附件,我有 Windows 7(32 位)PC。我的代码编译成功,但在运行时出错,说-
May 20, 2013 5:58:46 PM org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme
INFO: NTLM authentication scheme selected
May 20, 2013 5:58:47 PM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge
INFO: Failure authenticating with NTLM <any realm>@autodiscover.mydomain.com:443
我的代码是 -
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010);
ExchangeCredentials credentials;
credentials = new WebCredentials("myuser", "mypwd","mydomain");
service.setCredentials(credentials);
service.autodiscoverUrl("user@domain.com");
如何解决此 NTLM 身份验证错误?