Frage

I am working on Adobe Echo sign,I have downloaded the sample code from their website, I am using this sample code for sendingdocument, it has some code missing in sendDocument method so I have changed it. It's giving SoapHeader Exception,with nothing in InnerException,

{"apiActionId=XHZI4WF4BV693YS"}

below is my code of sending document

 public static void sendDocument(string apiKey, string fileName, string recipient)
        {
            ES = new EchoSignDocumentService16();
            FileStream file = File.OpenRead(fileName);
            secure.echosign.com.FileInfo[] fileInfos = new secure.echosign.com.FileInfo[1];
            fileInfos[0] = new secure.echosign.com.FileInfo(fileName, null, file);
            SenderInfo senderInfo = null;
            string[] recipients = new string[1];
            recipients[0] = recipient;
            DocumentCreationInfo documentInfo = new DocumentCreationInfo(
                recipients,
                "Test from SOAP: " + fileName,
                "This is neat.",
                fileInfos,
                SignatureType.ESIGN,
                SignatureFlow.SENDER_SIGNATURE_NOT_REQUIRED
            );

            DocumentKey[] documentKeys;
            senderInfo = new SenderInfo(recipient, "password", "APIKEY");
            documentKeys = ES.sendDocument(apiKey, senderInfo, documentInfo);
            Console.WriteLine("Document key is: " + documentKeys[0].documentKey);
        }

its giving exception on this line

 documentKeys = ES.sendDocument(apiKey, senderInfo, documentInfo);

Can anyone suggest some sample code of Adobe Echo Sign?

War es hilfreich?

Lösung

On the account page of your login there is an API log you can check. If you check the log entry for your request you may find more information there.

I can't see anything immediately wrong with your code however the EchoSign API guide says that the 'tos' field is deprecated and that the recipients field should be used instead. Helpfully this means you can't use the paramaterised constructor. Try creating your document creation info as such (this is C# but if you need Java it should be straightforward to figure out):

RecipientInfo[] recipientInfo = new RecipientInfo[1];
recipientInfo[0] = new RecipientInfo
{
    email = "recipient",
    role = RecipientRole.SIGNER,
    roleSpecified = true 
};

DocumentCreationInfo documentCreationInfo = new DocumentCreationInfo
{
    recipients = recipientInfo,
    name = "Test from SOAP: " + fileName,
    message = "This is neat.",
    fileInfos = fileInfos,
    signatureType = SignatureType.ESIGN,
    signatureFlow = SignatureFlow.SENDER_SIGNATURE_NOT_REQUIRED
};

Note that when using the recipientInfo array it seems that the roleSpecified field must be set to true. This little field tripped me up for ages and I was receiving errors similar to yours.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top