Duo_Liang submitted November 2 2018

This simple example code shows how to use the Apex SDK to create and send a package.

For detailed steps, you can refer to this guidance:
https://developer.esignlive.com/guides/quick-start/creating-sending-package/

Rate this Code Share

Comments

prnygupta | Posts: 2

Reply to: Simple Create and Send Package (Apex SDK)

0 votes

Hi,

I am using the code which you have written. But in my case, i am getting an error 'ESignLiveRESTAPIHelper.ESignLiveRestAPIHelperException: Error creating eSignLive package with documents: Illegal value for primitive' on below line - 

sdk.createDocuments(packageId, document, doc);

Below is the response we are trying to deserialize - 

{"status":"",
"description":"",
"id":"document1",
"external":null,
"extract":false,
"extractionTypes":[],
"tagged":false,
"approvals":[],
"signedHash":null,
"signerVerificationToken":null,
"pages":[{"id":"","left":0.0,"width":796.0,"height":1030.0,"top":0.0,"index":0,"version":0}],
"data":{"ese_document_texttag_extract_needed":"false"},
"index":1,
"fields":[],
"name":"Sample Contract",
"size":8534}

with class Document - 

public class Document
    {
        public List<Approval> approvals;
        public Data data;
        public String description;
        public External external;
        public Boolean extract;
        public List<Field> fields;
        public String id;
        public Integer index;
        public String name;
        public List<Page_x> pages;
        public Integer size;

}

The issue is with the field data. In Document class , its mentioned as String but in reponse , its not string. Can you help in this case.

Thanks

Pranay

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off