2013-06-04 2 views
2

공용 일정 폴더를 만들었지 만 사용자가 볼 수 없습니다. 다른 사람들과 공유해야합니다.(EWS) 공용 일정 폴더에 연결할 수 없습니다. Java

FolderView fv = new FolderView(50); 
fv.setTraversal(FolderTraversal.Deep); 
FindFoldersResults f = service.findFolders(WellKnownFolderName.PublicFoldersRoot, fv); 

문제는 내가 WellKnownFolderName.Root로 변경하거나 일정 또는받은 편지함과 같은 다른 상수가 제대로 작동하는 경우가 java.lang.NullPointerException

microsoft.exchange.webservices.data.EWSHttpException: Connection not established 

을 던져입니다 :

이 내 코드입니다. Outlook을 사용하여 내용을 검토 할 수 있습니다.

Java가있는 공용 캘린더 폴더에 액세스 할 수 없지만 ID를 모르는 경우 어떻게해야합니까?

+0

답변을 찾으셨습니까? – Halvard

+0

여기에 실제 예제가 있습니다 : [http://stackoverflow.com/questions/30594319/office365-api-admin-accessing-another-users-rooms-calendar-events/39040613#39040613](http://stackoverflow. com/questions/30594319/office365-api-admin-accessible-another-users-rooms-calendar-events/39040613 # 39040613) – Twelve24

+0

게시물은 꽤 오래되었지만 해결책이 있습니까? 나는 같은 사건을 겪고있다. 공용 폴더의 폴더를 나열 할 수 없습니다. – yatinbc

답변

1

공유 폴더와 사람/자원의 이메일 주소를 알고 있다면, 다음이 여기에 동작하는 예제가있다

//Create a inclusive view 
FolderView fv = new FolderView(100); 
fv.setTraversal(FolderTraversal.Deep); 

//Find ID of parent calendar 
FolderId sharedFolderId = new FolderId(WellKnownFolderName.Calendar, new Mailbox("[email protected]")); 

//Find children of that calendar 
FindFoldersResults findResults = service.findFolders(sharedFolderId, fv); 
+0

예외가 발생합니다. microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException : 공용 폴더 루트가있는 사서함을 지정하는 것은 유효하지 않습니다. – yatinbc

관련 문제