gpt4 book ai didi

vb.net - 类型 'String' 的错误值无法转换为 'secure.echosign.com.ArrayOfString'

转载 作者:行者123 更新时间:2023-12-04 08:52:10 33 4
gpt4 key购买 nike

我正在使用 Adob​​e EchoSign Web 服务在 vb.net 中创建 SendDocument 函数。我在这篇文章 Using EchoSign API in VB.net 中尝试了解决方案,但没有运气。

我收到一个错误

Value of type 'String' cannot be converted to 'secure.echosign.com.ArrayOfString'



在我下面的代码中 .recipients = receivers(0)
Public Sub SendDocument(ByVal apiKey, ByVal fileName, ByVal formFieldLayerTemplateKey, ByVal recipient)  

Dim recipients() As String = recipient

Dim docRecipient As RecipientInfo = New RecipientInfo()
With docRecipient
.email = recipient
.fax = "800-123-4567"
.role = RecipientRole.SIGNER
End With

Dim docCreationInfo As DocumentCreationInfo = New DocumentCreationInfo()
With docCreationInfo
.recipients = docRecipient(0)
.name = Path.GetFileName(File.Name)
.message = TestMessage
.fileInfos = fileInfos
.signatureType = SignatureType.ESIGN
.signatureFlow = SignatureFlow.SENDER_SIGNATURE_NOT_REQUIRED
End With

当我尝试 .recipients = recipients 时,错误显示

Value of type '1-dimensional array of String' cannot be converted to 'secure.echosign.com.ArrayOfString'.



有关如何解决错误的任何建议?

最佳答案

尝试将 RecipientInfo 对象数组分配给 .recipients 字段:

'create a RecipientInfo object
Dim docRecipient As RecipientInfo = New RecipientInfo
With docRecipient
.email = recipient
.fax = "800-123-4567"
.role = RecipientRole.SIGNER
End With

'create a RecipientInfo array with your new object as its contents
Dim recipients() As RecipientInfo = { docRecipient }

'create a DocumentCreationInfo and assign the array to the recipients field
Dim docCreationInfo As DocumentCreationInfo = New DocumentCreationInfo
With docCreationInfo
.recipients = recipients
.name = Path.GetFileName(File.Name)
.message = TestMessage
.fileInfos = fileInfos
.signatureType = SignatureType.ESIGN
.signatureFlow = SignatureFlow.SENDER_SIGNATURE_NOT_REQUIRED
End With

关于vb.net - 类型 'String' 的错误值无法转换为 'secure.echosign.com.ArrayOfString',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25367010/

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