我想了解以下Lotus-Domino服务器到服务器复制方案中发生的情况:
在这种情况下,我希望服务器A将从服务器B中删除文档.方案有变化,服务器C与B复制,B用A启动复制.
我有一个围绕这个期望构建的应用程序,并且它在大多数情况下都运行良好.但是有一些注释保留在服务器B上,并且从复制过程中排除.OID仍然不同.在某些情况下,DSN会在两个备注上更新,而在复制过程中没有任何结果.
使用Google Apps电子邮件设置API,将使用以下脚本删除委托.如果发生错误,例如尝试删除不存在的委托,则返回以下消息:
例外:返回代码400的请求失败.截断的服务器响应:<xml version ="1.0"encoding ="UTF-8"?> <AppsForYourDomainErrors> <error errorCode ="1303"invalidInput ="XXXX@XXXX.com"reason = "E ...(使用muteHttpExceptions选项检查完整响应)
但是,使用muteHttpExceptions = true身份验证失败时:
例外:无法对服务进行身份验证:google
这迫使我使用try/catch结构而不是检查HTTPResponse对象.我想知道为什么会这样,以及如何解决它.
测试功能:
function test() {
var consumerKey = 'XXXX';
var consumerSecret = 'XXXX';
var domain = 'XXXX.com';
var userName = 'XXXX'
var delegateName = 'XXXX@XXXX.com'
var serviceName = 'google';
var scope = 'https://apps-apis.google.com/a/feeds/emailsettings/2.0/';
var oAuthConfig = UrlFetchApp.addOAuthService(serviceName);
oAuthConfig.setRequestTokenUrl('https://www.google.com/accounts/OAuthGetRequestToken?scope=' + scope);
oAuthConfig.setAuthorizationUrl('https://www.google.com/accounts/OAuthAuthorizeToken');
oAuthConfig.setAccessTokenUrl('https://www.google.com/accounts/OAuthGetAccessToken');
oAuthConfig.setConsumerKey(consumerKey);
oAuthConfig.setConsumerSecret(consumerSecret);
var fetchParameters = {};
fetchParameters.oAuthServiceName = serviceName;
fetchParameters.oAuthUseToken = 'always';
fetchParameters.method = …Run Code Online (Sandbox Code Playgroud)