How to pre-fill tabs on a server template with the DocuSign API(如何使用 DocuSign API 预填充服务器模板上的选项卡)
问题描述
是否可以在服务器模板上填写选项卡?如果是这样,那么正确的 XML 格式是什么?我已经尝试过 DocuSign 论坛上帖子中建议的解决方案,但该解决方案不起作用.我已阅读文档,但不清楚格式应该是什么,我似乎找不到任何示例.这就是我现在所拥有的,它不工作它返回和错误 400:XML 请求与预期格式不匹配.有谁知道正确的格式吗?
Is it possible to fill in a tab on a server template? If so what would be the correct XML format to do that? I have tried the suggested solution from the post on the DocuSign forum, that solution did not work. I have read the documentation but it is unclear what the format should be and I can't seem to find any examples. This is what I have now and it is not working it returns and error 400: The XML request does not match the expected format. Does anyone know for sure the correct format?
* * 更新 ****我使用 JSON 到 XML 转换器来获得正确的 xml 格式.以下内容被服务器接受但不更新服务器模板.
* * Update **** I used a JSON to XML converter to get the correct xml format. The following is accepted by the server but does not update the server template.
String requestBody = "<envelopeDefinition xmlns="http://www.docusign.com/restapi">" +
"<accountId>" + accountId + "</accountId>" +
"<status>sent</status>" +
"<emailSubject>" + emailSubject + "</emailSubject>" +
"<emailBlurb>" + emailBlurb + "</emailBlurb>" +
"<templateId>81bcad0d-91ed-4616-****-************</templateId>" +
"<templateRoles>" +
"<templateRole>" +
"<email>" + emailaddr4[0] + "</email>" +
"<name>" + names[0] + "</name>" +
"<roleName>Student</roleName>" +
"<tabs>" +
"<textTabs>" +
"<textTab>" +
"<tabLabel>StudentID</tabLabel>" +
"<value>" + student_id + "</value>" +
"<documentId>1</documentId>" +
"<pageNumber>1</pageNumber>" +
"</textTab>"
"</textTabs>" +
"</tabs>" +
"</templateRole>" +
"</templateRoles>" +
"</envelopeDefinition>";
推荐答案
抱歉,我可以发誓在 textTabs 元素中需要单数 textTab,但它看起来应该只是命名为 text 代替.这是一个完整的 XML 请求正文,可以使用
Sorry, I could have sworn that the singular textTab was needed inside of the textTabs element, but it looks like this supposed to be named just text instead. Here is a full XML request body that works
<envelopeDefinition xmlns="http://www.docusign.com/restapi">
<accountId>221765</accountId>
<status>sent</status>
<emailSubject>API Call for sending signature request from template</emailSubject>
<emailBlurb>This comes from Java</emailBlurb>
<templateId>DD92AF6F-3B87-435C-A652-A7451AFE758E</templateId>
<templateRoles>
<templateRole>
<email>email@docusign.com</email>
<name>John Doe</name>
<roleName>Signer1</roleName>
<tabs>
<textTabs>
<text>
<tabLabel>DataField1</tabLabel>
<value>Initial Data Goes Here</value>
</text>
</textTabs>
</tabs>
</templateRole>
</templateRoles>
</envelopeDefinition>
这篇关于如何使用 DocuSign API 预填充服务器模板上的选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何使用 DocuSign API 预填充服务器模板上的选项卡
基础教程推荐
- “未找到匹配项"使用 matcher 的 group 方法时 2022-01-01
- 无法使用修饰符“public final"访问 java.util.Ha 2022-01-01
- 降序排序:Java Map 2022-01-01
- FirebaseListAdapter 不推送聊天应用程序的单个项目 - Firebase-Ui 3.1 2022-01-01
- Java:带有char数组的println给出乱码 2022-01-01
- 设置 bean 时出现 Nullpointerexception 2022-01-01
- 减少 JVM 暂停时间 >1 秒使用 UseConcMarkSweepGC 2022-01-01
- 如何使用 Java 创建 X509 证书? 2022-01-01
- Java Keytool 导入证书后出错,"keytool error: java.io.FileNotFoundException &拒绝访问" 2022-01-01
- 在 Libgdx 中处理屏幕的正确方法 2022-01-01