將下列XML提交給DocuSign API時,我收到「INVALID_EMAIL_ADDRESS_FOR_RECIPIENT」錯誤。我試過手動更改地址併爲每個簽名者使用不同的地址。爲什麼當我可以將電子郵件發送到任何我已直接嘗試電子郵件的地址時,該請求會返回無效地址?Docusign無效的電子郵件
String [] emailaddr4 = new String {"[email protected]", "[email protected]", "[email protected]", "[email protected]"};
String xml = "<envelopeDefinition xmlns=\"http://www.docusign.com/restapi\">" +
"<accountId>" + accountId + "</accountId>" +
"<status>sent</status>" +
"<emailSubject>" + emailSubject + "</emailSubject>" +
"<emailBlurb>" + emailBlurb + "</emailBlurb>" +
"<templateId>81bcad0d-****-****-****-f281b24a4567</templateId>" +
"<templateRoles>" +
"<templateRole>" +
"<email>" + emailaddr4[0] + "</email>" +
"<userName>" + emailaddr4[0] + "</userName>" +
"<name>" + names[0] + "</name>" +
"<roleName>Student</roleName>" +
"<clientUserId>1</clientUserId>" +
"<tabs>" +
"<textTabs>" +
"<text>" +
"<tabLabel>sid</tabLabel>" +
"<value>" + student_id + "</value>" +
"</text>" +
"</textTabs>" +
"</tabs>" +
"</templateRole>" +
"<templateRole>" +
"<email>" + emailaddr4[1] + "</email>" +
"<name>" + names[1] + "</name>" +
"<roleName>Advisor</roleName>" + //must match role in envelope
"<userName>" + emailaddr4[1] + "</userName>" +
"<routingOrder>1</routingOrder>" +
"</templateRole>" +
"<templateRole>" +
"<email>" + emailaddr4[2] + "</email>" +
"<name>" + names[2] + "</name>" +
"<roleName>DeptHead</roleName>" +
"<userName>" + emailaddr4[2] + "</userName>" +
"<routingOrder>2</routingOrder>" +
"</templateRole>" +
"<templateRole>" +
"<email>" + emailaddr4[3] + "</email>" +
"<name>" + names[3] + "</name>" +
"<roleName>Dean</roleName>" +
"<userName>" + emailaddr4[3] + "</userName>" +
"<routingOrder>3</routingOrder>" +
"</templateRole>" +
"</templateRoles>" +
"</envelopeDefinition>";
這裏是寫入DataOutputSteam
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<accountId>******</accountId>
<status>sent</status>
<emailSubject>This is a test.</emailSubject>
<emailBlurb>Java DS Test</emailBlurb>
<templateId>81bcad0d-****-****-****-f281b24a4567</templateId>
<templateRoles>
<templateRole>
<email>[email protected]</email>
<userName>[email protected]</userName>
<name>Tester</name>
<roleName>Student</roleName>
<clientUserId>1</clientUserId>
<tabs>
<textTabs>
<text>
<tabLabel>sid</tabLabel>
<value>6644</value>
</text>
</textTabs>
</tabs>
</templateRole>
<templateRole>
<email>[email protected]</email>
<name>Alan advisor</name>
<roleName>Advisor</roleName>
<userName>[email protected]</userName>
<routingOrder>1</routingOrder>
</templateRole>
<templateRole>
<email>[email protected]</email>
<name>CTS</name>
<roleName>DeptHead</roleName>
<userName>[email protected]</userName>
<routingOrder>2</routingOrder>
</templateRole>
<templateRole>
<email>[email protected]</email>
<name>Jennifer</name>
<roleName>Dean</roleName>
<userName>[email protected]</userName>
<routingOrder>3</routingOrder>
</templateRole>
</templateRoles>
</envelopeDefinition>
這是響應請求的模板收件人時,實際的XML。
<recipients xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<agents/>
<carbonCopies/>
<certifiedDeliveries/>
<editors/>
<inPersonSigners/>
<intermediaries/>
<recipientCount>4</recipientCount>
<signers>
<signer>
<recipientId>9d44f02b-****-****-****-db256768d013</recipientId>
<recipientIdGuid>9d44f02b-****-****-****-db256768d013</recipientIdGuid>
<requireIdLookup>false</requireIdLookup>
<roleName>Student</roleName>
<routingOrder>1</routingOrder>
<status>created</status>
<templateLocked>false</templateLocked>
<templateRequired>true</templateRequired>
<email/>
<name/>
<signInEachLocation>false</signInEachLocation>
</signer>
<signer>
<recipientId>3a1f0ff1-****-****-****-bbecca30dc1a</recipientId>
<recipientIdGuid>3a1f0ff1-****-****-****-bbecca30dc1a</recipientIdGuid>
<requireIdLookup>false</requireIdLookup><roleName>DeptHead</roleName>
<routingOrder>3</routingOrder>
<status>created</status>
<templateLocked>false</templateLocked>
<templateRequired>true</templateRequired>
<email/>
<name/>
<signInEachLocation>false</signInEachLocation>
</signer>
<signer>
<recipientId>2dd69109-****-****-****-4773cabe5632</recipientId>
<recipientIdGuid>2dd69109-****-****-****-4773cabe5632</recipientIdGuid>
<requireIdLookup>false</requireIdLookup>
<roleName>Advisor</roleName>
<routingOrder>2</routingOrder>
<status>created</status>
<templateLocked>false</templateLocked>
<templateRequired>true</templateRequired>
<email/>
<name/>
<signInEachLocation>false</signInEachLocation>
</signer>
<signer>
<recipientId>085d8e2c-****-****-****-bdd92344e257</recipientId>
<recipientIdGuid>085d8e2c-****-****-****-bdd92344e257</recipientIdGuid>
<requireIdLookup>false</requireIdLookup><roleName>Dean</roleName>
<routingOrder>4</routingOrder>
<status>created</status>
<templateLocked>false</templateLocked>
<templateRequired>true</templateRequired>
<email/>
<name/>
<signInEachLocation>false</signInEachLocation>
</signer>
</signers>
</recipients>
您可以更新您的問題發佈這類線路上的實際發送請求的XML痕跡? (你可以使用像Fiddler之類的工具輕鬆地生成一個請求跟蹤。) –
@KimBrandl Kim我用代碼填充版本更新了原始問題,希望能夠提供更多信息。 – user2573754
重新解決了您的問題,並在我的答案中提出瞭解決方案。 –