无效的命名属性 [英] Invalid Named Property

查看:127
本文介绍了无效的命名属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们将Microsoft交易所称为设置扩展属性,在我们的案例中,扩展属性是唯一的guid

We call the microsoft exchange to set the extended property which in our case is an unique guid

microsoft.exchange.webservices.data.core.exception.service.remote.ServiceResponseException: An internal server error occurred. The operation failed., Invalid named property

到目前为止,当我们的某些用户遇到上述问题时,它一直工作得很好....

Its been working great until now when some of our users are facing the above issue ....

 val uId = getUniqueId();    

val emailExtendedPropDef = new ExtendedPropertyDefinition(uId,"uniqueId", MapiPropertyType.String)
    try {
      email.setExtendedProperty(emailExtendedPropDef, uId.toString)
      email.sendAndSaveCopy()
    } catch {
      case e: Exception =>
        error(s"Exception in setting extended property for user $from", e)
        throw e
    }

试图找到问题的根本原因,我们还认为这可能与限制Microsoft交换扩展属性有关(不确定如何证明是否确实存在限制),这有助于向正确的方向指明方向.很有帮助

trying to find the root cause of the issue, we are also thinking it might be related to throttling on Microsoft exchange for extended properties (Not sure how to prove if it's indeed throttling) any help to point us in the right direction will be of great help

我们的用例是能够在客户想要回复时检索电子邮件,而我们希望检索要包含在用户回复中的特定电子邮件....当前,我们正在使用uid来实现该目标....

Our use case is to able to retrieve the email when customer want's to reply back we want to retrieve that particular email to be included in users reply....currently we are using the uid to achieve that ....

我们一直按照此处的文档使用代码

we have been using the code as per the documentation here

以及此处的文档

https://github.com /OfficeDev/ews-java-api/wiki/Getting-Started-Guide#extended-properties

Update:根据评论,我们确实知道我们必须将extendedProperty视为列定义并更新同一列...但是我们无法确定如何实现这一点,因为任何代码示例都必须指出朝着正确的方向前进对我们会有很大帮助

Update : As per the comments we do understand that we have to treat extendedProperty as a column definition and update the same column ...but we couldn't figure out how to achieve this as...Any code samples to point us in the right direction will be of great help

最新更新:我们已删除了一些extendedPropertyDefinition,但仍然面临着相同的无效属性,可能有人需要向我们指出正确的方向

Latest Update : We have deleted some of the extendedPropertyDefinition's but still facing the same invalid property could some one please point us in the right direction

推荐答案

可以肯定地说getUniqueId在每次调用时返回不同的guid吗?如果是这样,那就是问题所在.将扩展道具的Guid视为命名空间.交换存储将自定义扩展道具的数量限制为每个邮箱32k.因此,您很可能会达到该极限.但是除此之外,创建扩展属性的主要原因是可以在以后引用它.但是,如果您基本上每次都放弃名称空间,那么您将在项目上留下孤立的道具.在不了解您的特定情况的情况下,我只能说Guid应该被视为真正的命名空间.为您的应用程序/公司/方案选择一个,并对其进行硬编码.他们在该命名空间中创建所需的所有命名道具.例如,Guid名称空间1中的"MyProp/String"与Guid名称空间2中的"MyProp/String"是不同的属性.

Is it safe to say that getUniqueId returns a different guid on each call? If so, then that is the problem. Think of the Guid for an extended prop as a namespace. The exchange store limits the number of custom extended props to something like 32k per mailbox. So you are likely hitting that limit. But aside from that, the main reason for creating an extended property is so that you can refer to it later. But if you are basically discarding the namespace each time, you are leaving orphaned props on items. Without understanding your particular scenario, I can only say that the Guid should be thought of truly as a namespace. Choose one for your app/company/scenario and hard code it. They create all the named props you want within that namespace. For instance, "MyProp/String" in Guid namespace 1 is a different property than "MyProp/String" in Guid namespace 2.

这篇关于无效的命名属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆