none
The Autodiscover service couldn't be located with EWS Java API 1.1 RRS feed

  • Question

  • i am using EWS Java API 1.1 to access exchange 2010 account as follows:
                            ExchangeService service = new ExchangeService();    			ExchangeCredentials credentials = new WebCredentials(email,    					password);    			service.setCredentials(credentials);    			service.autodiscoverUrl("adamb@fabrikam.com");    			Folder inbox = Folder.bind(service, WellKnownFolderName.Inbox);    			System.out.println("messages: " + inbox.getTotalCount());



    but i am getting the following exception:
        08/10/2012 05:11:35 م org.apache.commons.httpclient.HttpMethodDirector executeWithRetry    INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect    08/10/2012 05:11:35 م org.apache.commons.httpclient.HttpMethodDirector executeWithRetry    INFO: Retrying request    08/10/2012 05:11:56 م org.apache.commons.httpclient.HttpMethodDirector executeWithRetry    INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect    08/10/2012 05:11:56 م org.apache.commons.httpclient.HttpMethodDirector executeWithRetry    INFO: Retrying request    08/10/2012 05:12:17 م org.apache.commons.httpclient.HttpMethodDirector executeWithRetry    INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out: connect    08/10/2012 05:12:17 م org.apache.commons.httpclient.HttpMethodDirector executeWithRetry    INFO: Retrying request    microsoft.exchange.webservices.data.AutodiscoverLocalException: The Autodiscover service couldn't be located.    	at microsoft.exchange.webservices.data.AutodiscoverService.internalGetLegacyUserSettings(Unknown Source)    	at microsoft.exchange.webservices.data.AutodiscoverService.getLegacyUserSettings(Unknown Source)    	at microsoft.exchange.webservices.data.AutodiscoverService.internalGetLegacyUserSettings(Unknown Source)    	at microsoft.exchange.webservices.data.AutodiscoverService.getUserSettings(Unknown Source)    	at microsoft.exchange.webservices.data.ExchangeService.getAutodiscoverUrl(Unknown Source)    	at microsoft.exchange.webservices.data.ExchangeService.autodiscoverUrl(Unknown Source)    	at microsoft.exchange.webservices.data.ExchangeService.autodiscoverUrl(Unknown Source)    	at main.java.TestMail.main(TestMail.java:22)



    please advise how to fix that.
    Tuesday, October 9, 2012 11:00 AM

All replies

  • EWS releases don't support future versions of exchange at the time of their release.  EWS 1.1 is for Exchange 2007 SP1.  Try using EWS 1.2, or the latest release of EWS.  All versions of EWS are supposed to be backwards compatible down to Exhange 2007 SP1
    Tuesday, October 9, 2012 7:50 PM
  • You can check with https://www.testexchangeconnectivity.com/ to get more information on why autodiscover fails.

    How do you do autodiscover ? Please check if autodiscover URL points to correct exchange CAS which can respond to autodiscover requests.


    Thanks, Nimesh

    Wednesday, October 10, 2012 10:00 AM
  • Hi,

    Has this been resolved? I am also getting similar error. Please advise.

    Friday, October 26, 2012 2:16 PM