创建没有电子邮件地址的联系人EWS Managed API 1.0 [英] Create contact without email address EWS Managed API 1.0
问题描述
大家好,
当我尝试创建没有电子邮件地址的联系人时,我收到此错误:
请求模式验证失败:元素'EmailAddresses 'in namespace'http://schemas.microsoft.com/exchange/services/2006/types'的内容不完整。预期可能元素的列表:名称空间'http://schemas.microsoft.com/exchange/services/2006/types'中的'Entry'。
具有空字符串作为地址导致抛出'ErrorCorruptData'错误。更新失败并导致错误,并显示以下消息:
更改说明中的对象必须包含一个且仅包含一个要修改的属性
如何创建没有电子邮件地址的联系人?
目标服务器是Exchange Server 2007 SP2
任何帮助将受到赞赏
感谢
Hello all,
When I try to create contact without email address, I get this error:
The request failed schema validation: The element 'EmailAddresses' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types' has incomplete content. List of possible elements expected: 'Entry' in namespace 'http://schemas.microsoft.com/exchange/services/2006/types'.
Having an empty string as the address causes the 'ErrorCorruptData' error to be thrown. Also updates fails and cause an error with the following message:
An object within a change description must contain one and only one property to modify
How does one create contacts with no email addresses?
The target server is Exchange Server 2007 SP2
Any help will be appreciated
Thanks
推荐答案
这是一个真的好问题。我使用旧版本的EWS Managed API使用April2009测试版进行了一个测试项目,并且只需设置oContact.EmailAddresses(EmailAddressKey.EmailAddress1)=""就可以创建包含空白电子邮件的新联系人"。好的。
对于更新,我只需要设置oContact.EmailAddresses(EmailAddressKey.EmailAddress1)= NOTHING将其删除并且有效。
只是尝试更新代码到发布的API v1.0,现在没有任何一个可以工作,并得到与你相同的东西。
That's a really good question. I had a test project using the older version of the EWS Managed API using the April2009 beta and was able to create new contacts with blank emails by simply setting oContact.EmailAddresses(EmailAddressKey.EmailAddress1) = ""
Worked very well.
For updates, I just had to set oContact.EmailAddresses(EmailAddressKey.EmailAddress1) = NOTHING to blank it out and that worked.
Just trying to update the code to the released API v1.0 and now none of that works and getting the same things as you.
这篇关于创建没有电子邮件地址的联系人EWS Managed API 1.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!