Error A value of type "String" cannot be converted to "secure.echosign.com.ArrayOfString"

I am using the Adobe EchoSign web service to create the SendDocument function in vb.net. I tried the solution in this post Using the EchoSign API in VB.net , but no luck.

I get an error

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

in my code below in .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 is read

A value of type '1-dimensional String array' cannot be converted to 'Secure.echosign.com.ArrayOfString'.

Any suggestions for fixing the error?

+8
web-services echosign
source share
1 answer

Try assigning an array of RecipientInfo objects in 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 
+1
source share

All Articles