我正在使用Adobe服务在EchoSign中创建一个SendDocument函数。我在这个帖子Using EchoSign API in VB.net中尝试了这个解决方案,但没有成功。
我搞错了
不能将“String”类型的值转换为“secure.echosign.com.ArrayOfString”
在下面的代码中,.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当我尝试.recipients = recipients时,错误会读取
类型‘一维字符串数组’的值不能转换为‘secure.echo sign.com.ArrayOfString’。
对如何解决错误有任何建议吗?
发布于 2014-08-18 19:19:30
尝试将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 Withhttps://stackoverflow.com/questions/25367010
复制相似问题