DocuSign SOAP 中不允许使用 405 方法 API C# 客户端
405 Method Not Allowed in DocuSign SOAP API C# Client
我希望 DocuSign 能在这里发挥作用。我正在使用 SOAP API 指南 "Using DocuSign WSDL’s in the .Net Environment" 中的页面。我已经使用 CredentialsAPI 成功登录,并将 baseURL 传递给 DSAPIServiceSoapClient 的构造函数。但是每次调用时我都会收到 405 Method Not Allowed 错误。我已经尝试过将集成商密钥附加到用户名和不附加。我不确定我做错了什么。
CredentialSoapClient credsClient = new CredentialSoapClient();
LoginResult login = credsClient.Login(DSAPIUsername, DSAPIPassword, true);
string auth = "<DocuSignCredentials><Username>" + DSAPIUsername + "</Username>" +
"<Password>" + DSAPIPassword + "</Password>" +
"<IntegratorKey>" + DSIntegratorKey + "</IntegratorKey>" +
"</DocuSignCredentials>";
_apiClient = new DSAPIServiceSoapClient("DSAPIServiceSoap", login.Accounts.First().BaseUrl);
_scope = new OperationContextScope(_apiClient.InnerChannel);
HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty();
httpRequestProperty.Headers.Add("X-DocuSign-Authentication", auth);
OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty;
按照提示操作,发现问题出在自己的代码中。当我在Fiddler中查看错误时,详细信息显示"HTTP Verb used is not allowed"。那时我才意识到我是在 POST 到基础 url,而不是 dsapi.asmx。从登录中使用 BaseURL 时需要添加。对不起互联网。用户错误。
我希望 DocuSign 能在这里发挥作用。我正在使用 SOAP API 指南 "Using DocuSign WSDL’s in the .Net Environment" 中的页面。我已经使用 CredentialsAPI 成功登录,并将 baseURL 传递给 DSAPIServiceSoapClient 的构造函数。但是每次调用时我都会收到 405 Method Not Allowed 错误。我已经尝试过将集成商密钥附加到用户名和不附加。我不确定我做错了什么。
CredentialSoapClient credsClient = new CredentialSoapClient();
LoginResult login = credsClient.Login(DSAPIUsername, DSAPIPassword, true);
string auth = "<DocuSignCredentials><Username>" + DSAPIUsername + "</Username>" +
"<Password>" + DSAPIPassword + "</Password>" +
"<IntegratorKey>" + DSIntegratorKey + "</IntegratorKey>" +
"</DocuSignCredentials>";
_apiClient = new DSAPIServiceSoapClient("DSAPIServiceSoap", login.Accounts.First().BaseUrl);
_scope = new OperationContextScope(_apiClient.InnerChannel);
HttpRequestMessageProperty httpRequestProperty = new HttpRequestMessageProperty();
httpRequestProperty.Headers.Add("X-DocuSign-Authentication", auth);
OperationContext.Current.OutgoingMessageProperties[HttpRequestMessageProperty.Name] = httpRequestProperty;
按照提示操作,发现问题出在自己的代码中。当我在Fiddler中查看错误时,详细信息显示"HTTP Verb used is not allowed"。那时我才意识到我是在 POST 到基础 url,而不是 dsapi.asmx。从登录中使用 BaseURL 时需要添加。对不起互联网。用户错误。