Skip to main content
Jan 12, 2016 5:39 AM UTC
Question

while sending the document through API I am getting "Object Reference error not set to instance of an object" error

FileStream file = getTestPdfFile(fileName);

            com.echosign.secure.FileInfo[] fileInfos = new com.echosign.secure.FileInfo[1];

         

            fileInfos[0] = new com.echosign.secure.FileInfo();

            fileInfos[0].fileName = fileName;

            Byte[] bytes = File.ReadAllBytes(".\\" + fileName);

            String filed = Convert.ToBase64String(bytes);

            byte[] filedata = Convert.FromBase64String(filed);

            fileInfos[0].file = filedata;

            SenderInfo senderInfo = new SenderInfo();

            senderInfo = null;

            RecipientInfo[] recipientInfo = new RecipientInfo[2];

            RecipientInfo recipientEmail = new RecipientInfo();

            recipientEmail.email = recipient;

            recipientEmail.fax = null;

            recipientEmail.role = RecipientRole.SIGNER;

            recipientEmail.roleSpecified = true;

            recipientInfo[0] = recipientEmail;

            DocumentCreationInfo documentInfo = new DocumentCreationInfo();

            documentInfo.recipients = recipientInfo;

            documentInfo.name = "Testing Echo";

            documentInfo.fileInfos = fileInfos;

            documentInfo.signatureType = SignatureType.ESIGN;

            documentInfo.signatureFlow = SignatureFlow.SENDER_SIGNATURE_NOT_REQUIRED;

  ES.sendDocument(apiKey, senderInfo, documentInfo);

    This topic is closed to new replies. Start a new post to keep the conversation going.

    2 replies

    Inspiring
    Jan 26, 2016 9:07 AM UTC

    Hello Vinod,

    It seems that you were using sendDocument API call. Can you inbox me you registered email address with which you were trying to make API calls so that I can check if the call was ever made to E-Sign or not?

    Regards,

    -Rijul

    Translate
    Feb 15, 2016 7:20 AM UTC

    Hi Raj,

    Can you Please look into my code which I have posted and say what is the problem in that.

    Thanks in advance

    Regards,

    Vinod Kumar.

    Translate