use*_*962 8 vb.net web-services echosign
我正在使用Adobe EchoSign Web服务在vb.net中创建SendDocument函数.我在VB.net中使用EchoSign API尝试了这个解决方案,但没有运气.
我收到了一个错误
"String"类型的值无法转换为"secure.echosign.com.ArrayOfString"
在我的代码中.recipients = recipients(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
Run Code Online (Sandbox Code Playgroud)
当我尝试.recipients = recipients
错误读取
"1维数组String"类型的值无法转换为"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
Run Code Online (Sandbox Code Playgroud)