DocuSign RESOURCE NOT FOUND错误

时间:2014-05-16 19:54:43

标签: docusignapi

我现在收到此错误。我发送了一封电子邮件,要求我签名。当我单击VIEW DOCUMENTS按钮时,出现“此连接不可信”屏幕,无法绕过该屏幕。如果我访问docusign.com并单击“访问文档”链接,我将被要求输入安全代码并收到“输入了无效的电子邮件文档代码。请再试一次。”

现在代码显示:

            Dim docFile As String = "" + docName.Substring(41, (docName.Length() - 41)) + "\" + ""
        'Overwrite the default content-type header and set a boundary marker
        request.ContentType = "multipart/form-data; boundary=BOUNDARY"
        request.ServicePoint.Expect100Continue = False
        request.KeepAlive = False

        'Start building the multipart request body
        Dim asciLN As String = Chr(10)
        Dim asciCR As String = Chr(13)

        Dim requestBodyStart As String = asciCR + asciLN + asciCR + asciLN + "--BOUNDARY" + asciCR + asciLN + _
            "Content-Type: application/xml" + asciCR + asciLN + _
            "Content-Disposition: form-data" + asciCR + asciLN + _
            asciCR + asciLN + _
            xmlBody + asciCR + asciLN + asciCR + asciLN + "--BOUNDARY" + asciCR + asciLN + _
            "Content-Type: application/pdf" + asciCR + asciLN + _
            "Content-Disposition: file; filename=\" + docFile + ";  documentId=1" + asciCR + asciLN + _
             asciCR + asciLN
        Dim requestBodyEnd As String = asciCR + asciLN + "--BOUNDARY--" + asciCR + asciLN + asciCR + asciLN

制作申请:

        --BOUNDARY
Content-Type: application/xml
Content-Disposition: form-data

<envelopeDefinition xmlns="http://www.docusign.com/restapi"><status>sent</status><emailSubject>DocuSign API - Embedded Signing example</emailSubject><documents><document><documentId>1</documentId><name>\\10.1.11.100\SecureDocs\EnrollmentForms\CrystalReport1.pdf</name></document></documents><recipients><signers><signer><recipientId>1</recipientId><email>hmitchell@ata.edu</email><name>Alexandra Adams</name><tabs><signHereTabs><signHere><xPosition>100</xPosition><yPosition>100</yPosition><documentId>1</documentId><pageNumber>1</pageNumber></signHere></signHereTabs></tabs></signer></signers></recipients></envelopeDefinition>

--BOUNDARY
Content-Type: application/pdf
Content-Disposition: file; filename=\"CrystalReport1.pdf\";  documentId=1

%PDF-1.7 
%���� 
1 0 obj 
<< 
/Type /Catalog 
/Pages 2 0 R 
/PageMode /UseNone 
/ViewerPreferences << 
/FitWindow true 
/PageLayout /SinglePage 
/NonFullScreenPageMode /UseNone 

有人能看到问题吗?

感谢您的帮助

1 个答案:

答案 0 :(得分:0)

我能想到的两种可能性。首先,我在你正在构建的XML的documents元素中看到你有这个:

<documents>
  <document>
     <documentId>1</documentId>
     <name>\\10.1.11.100\SecureDocs\EnrollmentForms\CrystalReport1.pdf</name>
  </document>

我不相信你可以在文件名中使用反斜杠(\)字符,因为系统认为它是一个目录路径。试着改为:

<name>CrystalReport1.pdf</name>

接下来,通常未找到资源错误与您用作端点的完整URL相关。既然你没有说明我不确定这是不是问题,但是你打的是哪个端点?我相信它应该是:

http://{server}/restapi/{apiVersion}/accounts/{accountId}/envelopes

因此,如果您正在开发人员沙箱中进行集成并使用REST API的第2版并且您的帐户ID为12345,那么它应该是:

http://demo.docusign.net/restapi/v2/accounts/12345/envelopes