1

DocuSign API を正しく理解するのに問題があります。

私の最初のタスクは、単純に封筒を送信して作成することです。UIView と Core Graphics を使用して (iOS で) PDF を作成しました。次に、署名が必要なセクションにアンカー タブを配置しました。

アンカー タブを作成しているため、タブを出力の一部として送信する必要があるかどうかわかりません。

これが私の出力本文です

<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
 ************

サービスのドキュメントを徹底的に調べましたが、自動アンカー タブがどのように API に適合するか、適合するかどうかはよくわかりません。

使用したいすべてのフィールドを /s1/ /s2/ などとして配置して、自動アンカー タブを使用しようとしているにもかかわらず、タブを追加しますか?失敗した。

編集:自動アンカーに関係なく、タブを追加する必要があることがわかりました。署名、日付、およびタイトルのタブ自動アンカーを追加するにはどうすればよいですか?

4

2 に答える 2

1

まず、 DocumentのFileExtensionを指定することをお勧めします。(以下の例で行ったように。)

次に、必ず RoutingOrder を 1 (ゼロではない) から開始します。これが、発生しているエラーの原因である可能性があります。

最後に、次の SOAP XML の例では、ドキュメント内でアンカー テキストを使用して、次のようにタブを配置/指定しています。

  • 最初の署名者 (RecipientId=1) のエンベロープのテキスト\s1\が表示される場所にSignHereタブを配置します。
  • 最初の署名者 (RecipientId=1) のエンベロープのテキスト\d1\が表示される場所にDateSignedタブを配置します。
  • テキスト\t1\が表示される場所に、最初の署名者 (RecipientId=1) の封筒に [タイトル] タブを配置します。

  • 2 番目の署名者 (RecipientId=2) のエンベロープのテキスト\s2\が表示される場所にSignHereタブを配置します。

  • 2 番目の署名者 (RecipientId=2) のエンベロープのテキスト\d2\が表示される場所にDateSignedタブを配置します。
  • 2 番目の封筒 (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>
    

アンカー テキストを使用して指定された各タブには、少なくとも次の要素が含まれている必要があります。

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

オプションで、最初の署名者の署名タブに対してコード サンプルが行うように、 XOffsetYOffset、および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>
于 2013-09-27T00:48:31.773 に答える