0

Java API를 사용하여 Outlook.com에서 모든 캘린더 일정을 가져오고 싶습니다. 나는 연결이 코드를 테스트 :Java API를 사용하여 Outlook.com에서 캘린더 이벤트 가져 오기

public void findChildFolders(String username, String password) throws Exception 
    { 
     ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2); 
     ExchangeCredentials credentials = new WebCredentials(username, password); 

//  URI jira_url = URI.create("outlook.live.com"); 
     service.autodiscoverUrl(username, new RedirectionUrlCallback()); 
     service.setCredentials(credentials); 

     FindFoldersResults findResults = service.findFolders(WellKnownFolderName.Inbox, new FolderView(Integer.MAX_VALUE)); 

     for (Folder folder : findResults.getFolders()) 
     { 
      System.out.println("Count======" + folder.getChildFolderCount()); 
      System.out.println("Name=======" + folder.getDisplayName()); 
     } 
    } 

    static class RedirectionUrlCallback implements IAutodiscoverRedirectionUrl 
    { 
     @Override 
     public boolean autodiscoverRedirectionUrlValidationCallback(
      String redirectionUrl) 
     { 
      return redirectionUrl.toLowerCase().startsWith("https://"); 
     } 
    } 

을하지만 오류 스택 얻을 :

microsoft.exchange.webservices.data.autodiscover.exception.AutodiscoverLocalException: The Autodiscover service couldn't be located. 
    at microsoft.exchange.webservices.data.autodiscover.AutodiscoverService.internalGetLegacyUserSettings(AutodiscoverService.java:742) 

이 코드를 구현하는 적절한 방법은 무엇입니까?

답변