我在meteor js app中使用EWS,我使用lather撰写肥皂请求。
我想将所有会议都交换成Exchange,我需要会议的管理员电子邮件地址(SMTP),但它总是会像x500一样转发地址:
/O=ABCD/OU=EXCHANGE ADMINISTRATIVE GROUP (ABCDEFGH)/CN=RECIPIENTS/CN=ABCD00000"
我搜索了一个解决方案,发现了这个:
NameResolutionCollection coll = service.ResolveName("/O=ABCD/OU=EXCHANGE ADMINISTRATIVE GROUP (ABCDEFGH)/CN=RECIPIENTS/CN=ABCD00000", ResolveNameSearchLocation.DirectoryOnly,true)
但我不使用C#,如何以无技术方式完成。
答案 0 :(得分:1)
ResolveName SOAP请求应该类似于https://msdn.microsoft.com/en-us/library/office/aa563518(v=exchg.150).aspx,例如
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Header>
<t:RequestServerVersion Version="Exchange2007_SP1" />
</soap:Header>
<soap:Body>
<m:ResolveNames ReturnFullContactData="true" SearchScope="ActiveDirectoryContacts">
<m:UnresolvedEntry>test</m:UnresolvedEntry>
</m:ResolveNames>
</soap:Body>
</soap:Envelope>
&#13;
所以在Lather中,基于该页面上的其他示例,如
var lather = require('lather');
var resolveName = {
'm:ResolveNames' : {
attributes : [
{ ReturnFullContactData : 'true' },
{ SearchScope : 'ActiveDirectoryContacts' },
],
'm:UnresolvedEntry' : '/O=ABCD/OU=EXCHANGE ADMINISTRATIVE GROUP (ABCDEFGH)/CN=RECIPIENTS/CN=ABCD00000',
},
};
lather.up({
body : resolveName,
headers : {
Authorization : lather.basicAuth(exchangeUserName, exchangePassword),
},
additionalNamespaces : [
'xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"',
'xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"',
],
method : 'POST',
url : 'https://outlook.office365.com/EWS/Exchange.asmx',
}, function(error, res, body) {
...
});
&#13;
应该有效(但可能需要进行一些更改)
干杯 格伦