gpt4 book ai didi

ios - DocuSign 创建和发送信封未指定错误

转载 作者:行者123 更新时间:2023-11-29 13:04:03 34 4
gpt4 key购买 nike

我在正确理解 DocuSign API 时遇到了一些问题。

我的第一个任务是简单地发送和创建一个信封。我使用 UIView 和 Core Graphics 创建了一个 PDF(在 iOS 中)。然后我继续将 anchor 标签放在需要签名的部分。

由于创建 anchor 标签,我不确定是否应该将我的标签作为输出的一部分发送。

这是我的输出正文

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:DSAPIService="http://www.docusign.net/API/3.0" xsl:version="1.0">
<soap:Body>
<DSAPIService:CreateAndSendEnvelope>
<DSAPIService:Envelope>
<DSAPIService:AccountId>(Account Id)</DSAPIService:AccountId>
<DSAPIService:Documents>
<DSAPIService:Document>
<DSAPIService:ID>1</DSAPIService:ID>
<DSAPIService:Name>(Name)</DSAPIService:Name>
<DSAPIService:PDFBytes>(PDF data)</DSAPIService:PDFBytes>
</DSAPIService:Document>
</DSAPIService:Documents>
<DSAPIService:Recipients>
<DSAPIService:Recipient>
<DSAPIService:ID>1</DSAPIService:ID>
<DSAPIService:UserName>(Signer 1)</DSAPIService:UserName>
<DSAPIService:Email>(Signer 1 email)</DSAPIService:Email>
<DSAPIService:Type>Signer</DSAPIService:Type>
<DSAPIService:RoutingOrder>0</DSAPIService:RoutingOrder>
</DSAPIService:Recipient>
<DSAPIService:Recipient>
<DSAPIService:ID>2</DSAPIService:ID>
<DSAPIService:UserName>(Signer 2)</DSAPIService:UserName>
<DSAPIService:Email>(Signer 2 Email)/DSAPIService:Email>
<DSAPIService:Type>Signer</DSAPIService:Type>
<DSAPIService:RoutingOrder>1</DSAPIService:RoutingOrder>
</DSAPIService:Recipient>
<DSAPIService:Recipient>
<DSAPIService:ID>3</DSAPIService:ID>
<DSAPIService:UserName>(Signer 3)</DSAPIService:UserName>
<DSAPIService:Email>(Signer 3 email)</DSAPIService:Email>
<DSAPIService:Type>InPersonSigner</DSAPIService:Type>
<DSAPIService:CaptiveInfo/>
<DSAPIService:RoutingOrder>2</DSAPIService:RoutingOrder>
</DSAPIService:Recipient>
<DSAPIService:Recipient>
<DSAPIService:ID>4</DSAPIService:ID>
<DSAPIService:UserName>(Signer 4)</DSAPIService:UserName>
<DSAPIService:Email>(Signer 4 email)</DSAPIService:Email>
<DSAPIService:Type>Signer</DSAPIService:Type>
<DSAPIService:RoutingOrder>3</DSAPIService:RoutingOrder>
</DSAPIService:Recipient>
</DSAPIService:Recipients>
<DSAPIService:Tabs/>
<DSAPIService:Subject>(Subject)</DSAPIService:Subject>
<DSAPIService:EmailBlurb>Please sign the attached document.</DSAPIService:EmailBlurb>
<DSAPIService:EnableWetSign>true</DSAPIService:EnableWetSign>
</DSAPIService:Envelope>
</DSAPIService:CreateAndSendEnvelope>
</soap:Body>
</soap:Envelope>

这是我的回答

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"><soap:Header><wsa:Action>http://schemas.xmlsoap.org/ws/2004/08/addressing/fault</wsa:Action><wsa:MessageID>urn:uuid:9a22096c-ca51-4445-80fd-78c08f9b0f24</wsa:MessageID><wsa:RelatesTo>urn:uuid:7f921133-4834-402b-aaa7-769b7fa0042b</wsa:RelatesTo><wsa:To>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:To><wsse:Security><wsu:Timestamp wsu:Id="Timestamp-9b102c34-6215-4fd6-8f9c-f1cb6a30c080"><wsu:Created>2013-09-26T22:59:09Z</wsu:Created><wsu:Expires>2013-09-26T23:04:09Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>Unspecified_Error</faultstring><faultactor>https://www.docusign.net/api/3.0/DSAPI.asmx</faultactor><detail><ErrorCode xmlns="missing in Web.Config">1</ErrorCode><ErrorReason xmlns="missing in Web.Config">An Error Occurred.</ErrorReason></detail></soap:Fault></soap:Body></soap:Envelope>
namespace error : xmlns: 'missing in Web.Config' is not a valid URI
/api/3.0/DSAPI.asmx</faultactor><detail><ErrorCode xmlns="missing in Web.Config"
^
namespace error : xmlns: 'missing in Web.Config' is not a valid URI
="missing in Web.Config">1</ErrorCode><ErrorReason xmlns="missing in Web.Config"
^
2013-09-26 15:59:09.107 (iOS App Name)[89329:4003] DSAPIService_CreateAndSendEnvelope soap call failed:

************
Unspecified_Error
************

我非常彻底地查看了该服务的文档,但我真的不确定自动 anchor 选项卡如何适合 API(如果适合的话)。

即使我试图通过将我想使用的所有字段作为/s1//s2/等来使用自动 anchor 选项卡,我是否仍然添加选项卡?我看不到任何其他问题为什么调用失败。

编辑:我现在看到无论自动锚定如何我都需要添加标签。如何为签名、日期和标题添加标签自动 anchor ?

最佳答案

首先,我建议您为文档指定 FileExtension。 (正如我在下面提供的示例中所做的那样。)

其次,绝对从 1(不是零)开始 RoutingOrder。这可能是您收到错误的原因。

最后,以下 SOAP XML 示例使用文档中的 anchor 文本来放置/指定选项卡,如下所示:

  • 将第一个签名者 (RecipientId=1) 的 SignHere 标签放在信封中出现文本 \s1\ 的任何位置。
  • DateSigned 标签放在第一个签名者的信封中(RecipientId=1) 文本 \d1\ 出现的任何位置。
  • 标题标签放在第一个签名者的信封中(RecipientId=1) 文本 \t1\ 出现的任何位置。

  • SignHere 选项卡放在第二个签名者 (RecipientId=2) 的信封中出现文本 \s2\ 的任何位置。

  • DateSigned 标签放在第二个签名者的信封中(RecipientId=2) 文本 \d2\ 出现的任何位置。
  • Title 标签放在第二个 (RecipientId=2) 信封中出现文本 \t2\ 的任何位置。

        <ns:CreateAndSendEnvelope>
    <ns:Envelope>
    <ns:AccountId>my_account_id</ns:AccountId>
    <ns:Documents>
    <ns:Document>
    <ns:ID>1</ns:ID>
    <ns:Name>Simple NDA.pdf</ns:Name>
    <ns:PDFBytes>bytes_removed</ns:PDFBytes>
    <ns:FileExtension>pdf</ns:FileExtension>
    <ns:AttachmentDescription>Simple NDA</ns:AttachmentDescription>
    </ns:Document>
    </ns:Documents>
    <ns:Recipients>
    <ns:Recipient>
    <ns:ID>1</ns:ID>
    <ns:UserName>Betty Adams</ns:UserName>
    <ns:Email>BettyEmail@outlook.com</ns:Email>
    <ns:Type>Signer</ns:Type>
    <ns:RoutingOrder>1</ns:RoutingOrder>
    </ns:Recipient>
    <ns:Recipient>
    <ns:ID>2</ns:ID>
    <ns:UserName>John Jones</ns:UserName>
    <ns:Email>JohnEmail1@outlook.com</ns:Email>
    <ns:Type>Signer</ns:Type>
    <ns:RoutingOrder>2</ns:RoutingOrder>
    </ns:Recipient>
    </ns:Recipients>
    <ns:Tabs>
    <ns:Tab>
    <ns:RecipientID>1</ns:RecipientID>
    <ns:AnchorTabItem>
    <ns:AnchorTabString>\s1\</ns:AnchorTabString>
    <ns:XOffset>-7</ns:XOffset>
    <ns:YOffset>12</ns:YOffset>
    <ns:Unit>Pixels</ns:Unit>
    </ns:AnchorTabItem>
    <ns:Type>SignHere</ns:Type>
    </ns:Tab>
    <ns:Tab>
    <ns:RecipientID>1</ns:RecipientID>
    <ns:AnchorTabItem>
    <ns:AnchorTabString>\d1\</ns:AnchorTabString>
    </ns:AnchorTabItem>
    <ns:Type>DateSigned</ns:Type>
    </ns:Tab>
    <ns:Tab>
    <ns:RecipientID>1</ns:RecipientID>
    <ns:AnchorTabItem>
    <ns:AnchorTabString>\t1\</ns:AnchorTabString>
    </ns:AnchorTabItem>
    <ns:Type>Title</ns:Type>
    </ns:Tab>
    <ns:Tab>
    <ns:RecipientID>2</ns:RecipientID>
    <ns:AnchorTabItem>
    <ns:AnchorTabString>\s2\</ns:AnchorTabString>
    </ns:AnchorTabItem>
    <ns:Type>SignHere</ns:Type>
    </ns:Tab>
    <ns:Tab>
    <ns:RecipientID>2</ns:RecipientID>
    <ns:AnchorTabItem>
    <ns:AnchorTabString>\d2\</ns:AnchorTabString>
    </ns:AnchorTabItem>
    <ns:Type>DateSigned</ns:Type>
    </ns:Tab>
    <ns:Tab>
    <ns:RecipientID>2</ns:RecipientID>
    <ns:AnchorTabItem>
    <ns:AnchorTabString>\t2\</ns:AnchorTabString>
    </ns:AnchorTabItem>
    <ns:Type>Title</ns:Type>
    </ns:Tab>
    </ns:Tabs>
    <ns:Subject>Please DocuSign this document</ns:Subject>
    <ns:EmailBlurb>Please sign this document using DocuSign...thanks!</ns:EmailBlurb>
    </ns:Envelope>
    </ns:CreateAndSendEnvelope>

至少,使用 anchor 文本指定的每个选项卡必须包含以下元素:

                <ns:Tab>
<ns:RecipientID>2</ns:RecipientID>
<ns:AnchorTabItem>
<ns:AnchorTabString>\t2\</ns:AnchorTabString>
</ns:AnchorTabItem>
<ns:Type>Title</ns:Type>
</ns:Tab>

可选地,如果需要,您可以通过使用 XOffsetYOffset 指定偏移测量值,以便更精确地放置相对于 anchor 文本字符串位置的标记Unit 元素,如代码示例对第一个签名者的签名选项卡所做的那样:

                <ns:Tab>
<ns:RecipientID>1</ns:RecipientID>
<ns:AnchorTabItem>
<ns:AnchorTabString>\s1\</ns:AnchorTabString>
<ns:XOffset>-7</ns:XOffset>
<ns:YOffset>12</ns:YOffset>
<ns:Unit>Pixels</ns:Unit>
</ns:AnchorTabItem>
<ns:Type>SignHere</ns:Type>
</ns:Tab>

关于ios - DocuSign 创建和发送信封未指定错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19040542/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com