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.
Hello ,
I want to list folder in Inbox as following code, I get error as following.
FolderView folderView = new FolderView(100);
FindFoldersResults results = service.findFolders(WellKnownFolderName.Inbox, folderView);
Error:
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. The request failed schema validation: The 'Id' attribute is invalid - The value 'ınbox' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:DistinguishedFolderIdNameType' - The Enumeration constraint failed.
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:74)
at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:158)
at microsoft.exchange.webservices.data.core.ExchangeService.internalFindFolders(ExchangeService.java:377)
at microsoft.exchange.webservices.data.core.ExchangeService.findFolders(ExchangeService.java:425)
at microsoft.exchange.webservices.data.core.ExchangeService.findFolders(ExchangeService.java:461)
at com.teb.pusula.calendar.service.CalenderService.getCalenderFolderds(CalenderService.java:94)
at com.teb.pusula.calendar.service.Main.main(Main.java:14)
Caused by: microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: The request failed schema validation: The 'Id' attribute is invalid - The value 'ınbox' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:DistinguishedFolderIdNameType' - The Enumeration constraint failed.
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.processWebException(ServiceRequestBase.java:548)
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.validateAndEmitRequest(ServiceRequestBase.java:641)
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:62)
... 6 more
The text was updated successfully, but these errors were encountered:
I gor the same error while trying access WellKnownFolderName.INBOX. My locale was ISO_8859 (turkish).
In writeAttributesToXml function of FolderId.java there is a toLowerCase() usage. That is the cause of the problem because "I".toLowercase()=="ı" (i without dot on top) in turkish.
So I changed that code as:
...
public void writeAttributesToXml(EwsServiceXmlWriter writer)
throws ServiceXmlSerializationException {
if (this.getFolderName() != null) {
writer.writeAttributeValue(XmlAttributeNames.Id, this
.getFolderName().toString().toLowerCase(Locale.ENGLISH));
if (this.mailbox != null) {
try {
this.mailbox.writeToXml(writer, XmlElementNames.Mailbox);
} catch (Exception e) {
throw new ServiceXmlSerializationException(e.getMessage());
}
}
} else {
super.writeAttributesToXml(writer);
}
}
...
It works and does not breaks any tests.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hello ,
I want to list folder in Inbox as following code, I get error as following.
FolderView folderView = new FolderView(100);
FindFoldersResults results = service.findFolders(WellKnownFolderName.Inbox, folderView);
Error:
microsoft.exchange.webservices.data.core.exception.service.remote.ServiceRequestException: The request failed. The request failed schema validation: The 'Id' attribute is invalid - The value 'ınbox' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:DistinguishedFolderIdNameType' - The Enumeration constraint failed.
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:74)
at microsoft.exchange.webservices.data.core.request.MultiResponseServiceRequest.execute(MultiResponseServiceRequest.java:158)
at microsoft.exchange.webservices.data.core.ExchangeService.internalFindFolders(ExchangeService.java:377)
at microsoft.exchange.webservices.data.core.ExchangeService.findFolders(ExchangeService.java:425)
at microsoft.exchange.webservices.data.core.ExchangeService.findFolders(ExchangeService.java:461)
at com.teb.pusula.calendar.service.CalenderService.getCalenderFolderds(CalenderService.java:94)
at com.teb.pusula.calendar.service.Main.main(Main.java:14)
Caused by: microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: The request failed schema validation: The 'Id' attribute is invalid - The value 'ınbox' is invalid according to its datatype 'http://schemas.microsoft.com/exchange/services/2006/types:DistinguishedFolderIdNameType' - The Enumeration constraint failed.
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.processWebException(ServiceRequestBase.java:548)
at microsoft.exchange.webservices.data.core.request.ServiceRequestBase.validateAndEmitRequest(ServiceRequestBase.java:641)
at microsoft.exchange.webservices.data.core.request.SimpleServiceRequestBase.internalExecute(SimpleServiceRequestBase.java:62)
... 6 more
The text was updated successfully, but these errors were encountered: