如何使用ews java api获取共享日历 FindItemsResults fiResults=fFolders.getFolders().get(0).findItems(cntSearch,iv); 对于(项:fiResults.getItems()){ 试一试{ 对象WLinkAddressBookId=null; item.tryGetProperty(extendedPropertyDefinition,(OutParam)WLinkAddressBookId); 字节[]ssStoreID=(字节[])WLinkAddressBookId;
例外情况: java.lang.ClassCastException: microsoft.exchange.webservices.data.property.definition.ExtendedPropertyDefinition 不能投靠 microsoft.exchange.webservices.data.property.definition.PropertyDefinition 在 microsoft.exchange.webservices.data.core.service.ServiceObject.tryGetProperty(ServiceObject.java:455) 在 microsoft.exchange.webservices.data.core.service.ServiceObject.tryGetProperty(ServiceObject.java:441)如何使用ews java api获取共享日历 FindItemsResults fiResults=fFolders.getFolders().get(0).findItems(cntSearch,iv); 对于(项:fiResults.getItems()){ 试一试{ 对象WLinkAddressBookId=null; item.tryGetProperty(extendedPropertyDefinition,(OutParam)WLinkAddressBookId); 字节[]ssStoreID=(字节[])WLinkAddressBookId;,java,calendar,exchangewebservices,shared,Java,Calendar,Exchangewebservices,Shared,例外情况: java.lang.ClassCastException: microsoft.exchange.webservices.data.property.definition.ExtendedPropertyDefinition 不能投靠 microsoft.exchange.webservices.data.property.definition.PropertyDefinition 在 microsoft.exchange.webservices.data.core.service.
我高度支持这个问题,因为我一直在尝试用C#或Java()来获得解决方案。谢谢你的回答。我发现了这个问题。但是当我尝试使用ServiceObject的代码item.tryGetProperty时,尝试将PropertyDefinitionBase转换为PropertyDefinition,这里抛出java.lang.ClassCastException。你知道为什么吗?由于Glen Scales,我可以在MFCMAPI中找到共享日历文件夹,但无法通过编程实现(Java中的首选项)。我不知道如何访问ExtendeProperty(我们需要PittagWLinkEntryId,然后对其进行解码以获得ewsId AFAIK)。我得到了与您相同的强制转换例外。没有太大帮助,抱歉。谢谢。我已经创建了问题:。您可以将成功的代码发送给我吗?电子邮件:曹健。1224@gmail.com谢谢……我非常支持这个问题,因为我一直在尝试用C#或Java()来获得解决方案。谢谢你的回答。我发现了这个问题。但是当我尝试使用ServiceObject的代码item.tryGetProperty时,尝试将PropertyDefinitionBase转换为PropertyDefinition,这里抛出java.lang.ClassCastException。你知道为什么吗?由于Glen Scales,我可以在MFCMAPI中找到共享日历文件夹,但无法通过编程实现(Java中的首选项)。我不知道如何访问ExtendeProperty(我们需要PittagWLinkEntryID,然后对其进行解码以获得ewsId)。我得到与您相同的强制转换异常。没有太大帮助,抱歉。谢谢。我已经创建了问题:。您能将成功的代码发送给我吗?电子邮件:曹健。1224@gmail.com谢谢
FindItemsResults<Item> fiResults = fFolders.getFolders().get(0).findItems(cntSearch, iv);
for (Item item : fiResults.getItems()) {
try {
Object wLinkAddressBookEID = null;
item.tryGetProperty(extendedPropertyDefinition,(OutParam<Object>)wLinkAddressBookEID);
byte[] ssStoreID = (byte[]) wLinkAddressBookEID;