2

VB.net で提供されたサンプル C# コードを変換して、アプリケーション内で使用できるようにしようとしています。特に SendDocument メソッド。

誰かがすでにこれを行っていますか?

API を呼び出すたびに、エラー メッセージ "Fault: java.lang.NullPointerException" が返されます。

変換された関数は次のとおりです。

Public Shared Function SendDocument(ByVal apiKey As String, ByVal file As Byte(), ByVal recipientEmailAddress As String, ByVal fileName As String, ByVal message As String, ByVal expireDays As Int32) As String

    Try

        Dim ES As EchoSignDocumentService13 = New EchoSignDocumentService13()
        ES.Url = "https://secure.echosign.com/services/EchoSignDocumentService13"

        Dim recipients(1) As String
        recipients(0) = recipientEmailAddress

        Dim localSenderInfo As com.echosign.secure.SenderInfo = Nothing

        Dim echoFileInfo(1) As com.echosign.secure.FileInfo
        echoFileInfo(0) = New com.echosign.secure.FileInfo()
        With echoFileInfo(0)
            .fileName = fileName
            .mimeType = "application/msword"
            .file = file
        End With

        Dim echoDocumentInfo As com.echosign.secure.DocumentCreationInfo = New com.echosign.secure.DocumentCreationInfo()
        With echoDocumentInfo
            .tos = recipients
            .name = fileName
            .message = message
            .fileInfos = echoFileInfo
            .signatureType = SignatureType.ESIGN
            .signatureFlow = SignatureFlow.SENDER_SIGNATURE_NOT_REQUIRED
            .daysUntilSigningDeadline = expireDays
        End With

        Dim echoKey() As DocumentKey
        echoKey = ES.sendDocument(apiKey, localSenderInfo, echoDocumentInfo)

        Return echoKey(0).documentKey.ToString()

    Catch ex As Exception

        Return "EchoError: " & ex.Message

    End Try

End Function

どんな助けでも大歓迎です

ありがとう

リチャード

4

0 に答える 0