You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
ExchangeCredentials credentials = new WebCredentials("xxx", "xxx");
service.setUrl(new URI("https://mail.xxx.com/EWS/Exchange.asmx"));
service.setCredentials(credentials);
Folder msgFolderRoot = Folder.bind(service, WellKnownFolderName.Root);
int childFolderCount = msgFolderRoot.getChildFolderCount();
FolderView folderView = new FolderView(childFolderCount);
FindFoldersResults findResults = msgFolderRoot.findFolders(folderView);
for (Folder folder : findResults.getFolders()) {
System.out.println("Count======" + folder.getChildFolderCount());
System.out.println("Name=======" + folder.getDisplayName());
}
Log:
Exception in thread "main" microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: No mailbox with such guid.
at microsoft.exchange.webservices.data.core.response.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:278)
at microsoft.exchange.webservices.data.core.response.ServiceResponse.throwIfNecessary(ServiceResponse.java:267)
at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:165)
at microsoft.exchange.webservices.data.core.ExchangeService.bindToFolder(ExchangeService.java:504)
at microsoft.exchange.webservices.data.core.ExchangeService.bindToFolder(ExchangeService.java:523)
at microsoft.exchange.webservices.data.core.service.folder.Folder.bind(Folder.java:98)
at microsoft.exchange.webservices.data.core.service.folder.Folder.bind(Folder.java:147)
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1);
ExchangeCredentials credentials = new WebCredentials("xxx", "xxx");
service.setUrl(new URI("https://mail.xxx.com/EWS/Exchange.asmx"));
service.setCredentials(credentials);
Folder msgFolderRoot = Folder.bind(service, WellKnownFolderName.Root);
int childFolderCount = msgFolderRoot.getChildFolderCount();
FolderView folderView = new FolderView(childFolderCount);
FindFoldersResults findResults = msgFolderRoot.findFolders(folderView);
for (Folder folder : findResults.getFolders()) {
System.out.println("Count======" + folder.getChildFolderCount());
System.out.println("Name=======" + folder.getDisplayName());
}
Log:
Exception in thread "main" microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: No mailbox with such guid.
at microsoft.exchange.webservices.data.core.response.ServiceResponse.internalThrowIfNecessary(ServiceResponse.java:278)
at microsoft.exchange.webservices.data.core.response.ServiceResponse.throwIfNecessary(ServiceResponse.java:267)
at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:165)
at microsoft.exchange.webservices.data.core.ExchangeService.bindToFolder(ExchangeService.java:504)
at microsoft.exchange.webservices.data.core.ExchangeService.bindToFolder(ExchangeService.java:523)
at microsoft.exchange.webservices.data.core.service.folder.Folder.bind(Folder.java:98)
at microsoft.exchange.webservices.data.core.service.folder.Folder.bind(Folder.java:147)
The text was updated successfully, but these errors were encountered: