8

Adobe EchoSign Web サービスを使用して、vb.net で SendDocument 関数を作成しています。この投稿のソリューションを試しました VB.netでEchoSign APIを使用しましたが、うまくいきませんでした。

エラーが発生します

タイプ「文字列」の値は「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

.recipients = recipientsエラーの読み取りを試みると

タイプ「文字列の 1 次元配列」の値を「secure.echosign.com.ArrayOfString」に変換できません。

エラーを解決する方法について何か提案はありますか?

4

1 に答える 1

1

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
于 2014-08-18T19:19:30.407 に答える