我正在使用makeEwsRequestAsync在电子邮件上发出UpdateItem调用我刚刚复制了另一个与CopyItem一起使用的makeEwsRequestAsync。但是,UpdateItem的响应如下:
<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">*</Action></s:Header><s:Body><s:Fault><faultcode xmlns:a="http://schemas.microsoft.com/exchange/services/2006/types">a:ErrorInternalServerError</faultcode><faultstring xml:lang="en-US">An internal server error occurred. The operation failed.</faultstring><detail><e:ResponseCode xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">ErrorInternalServerError</e:ResponseCode><e:Message xmlns:e="http://schemas.microsoft.com/exchange/services/2006/errors">An internal server error occurred. The operation failed.</e:Message></detail></s:Fault></s:Body></s:Envelope>
有什么想法吗?以下是我正在制作的电话。我的目标是创建电子邮件的副本,更改主题行和收件人并发送它(模拟进行转发)。奇怪的是,当我在OWA中运行Mail Addin时,我对UpdateItem的调用甚至不会发生,但它在Outlook 2016中有效。我现在忽略了这个lol
<?xml version='1.0' encoding='utf-8'?><soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/' xmlns:t='http://schemas.microsoft.com/exchange/services/2006/types'> <soap:Header> <t:RequestServerVersion Version='Exchange2013'/> </soap:Header> <soap:Body>'<UpdateItem MessageDisposition='SaveOnly' ConflictResolution='AutoResolve' xmlns='http://schemas.microsoft.com/exchange/services/2006/messages'> <ItemChanges> <t:ItemChange> <t:ItemId Id='AAMkADk0OGI2NTc3LTZkY2QtNDc1NS05MWM1LTZlNmRhMjQ4MjRlMABGAAAAAACRc/2u6ZxxTKKnN1SuVEBWBwCiPid+VwI1QKpXdMXuhotWAAAAAAEMAACiPid+VwI1QKpXdMXuhotWAADwH8K3AAA=' ChangeKey='CQAAABYAAACiPid+VwI1QKpXdMXuhotWAADvtGmZ'/> <t:Updates> <t:SetItemField> <t:FieldURI FieldURI='item:Subject'/> <t:Message> <t:Subject>UPDATED SUBJECT</t:Subject> </t:Message> </t:SetItemField> </t:Updates> </t:ItemChange> </ItemChanges> </UpdateItem> </soap:Body></soap:Envelope>
答案 0 :(得分:1)
我可以看到你的XML有一个问题,你有一个额外的'in(在Body和UpdateItem之间)
<soap:Body>'<UpdateItem MessageDisposition='SaveOnly'
删除了您的请求对我来说没问题,您应该确保拥有最新的更改密钥,并且您尝试更新的项目应该位于运行AddIn的邮箱中
干杯 格伦