I am using Adobe EchoSign web service to create a SendDocument function in vb.net. I tried the solution in this post Using EchoSign API in VB.net but no luck.
I am getting an error
Value of type 'String' cannot be converted to 'secure.echosign.com.ArrayOfString'
in my code below at .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
When I try .recipients = recipients
the error reads
Value of type '1-dimensional array of String' cannot be converted to 'secure.echosign.com.ArrayOfString'.
Any suggestions on how to resolve the error?
Try assigning an array of RecipientInfo
objects to the .recipients
field:
'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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With