Account


Earned badges

Achievement: Latest Unlocked

Topic Started

Topics
Hi, I've been trying to send multiple packages asynchonously.
Hi, I've notice that I can make a document "Accept Only" in the eSignLive sandbox dashboard transaction creation page.
Hi, I'm trying to have my signature field and the date extracted from my PDF document.

Replies Created

Reply to: How to use SDK asynchronously

0 votes
While it is true that you can call as many times as you want the method, it wont actually start processing until the previous one is over. I decided to decompile the dll to see what was up behind the curtain. The function EslClient.CreatePackage(DocumentPackage) calls EslClient.UploadDocument() which calls PackageService.UploadDocument. Here is the code for the latter
internal Silanis.ESL.SDK.Document UploadDocument(DocumentPackage package, string fileName, byte[] fileBytes, Silanis.ESL.SDK.Document document)
    {
      lock (PackageService.syncLock)
      {
        string local_0 = this.template.UrlFor(UrlTemplate.DOCUMENT_PATH).Replace("{packageId}", package.Id.Id).Build();
        Package local_1 = new DocumentPackageConverter(package).ToAPIPackage();
        Silanis.ESL.API.Document local_2 = new DocumentConverter(document).ToAPIDocument(local_1);
        try
        {
          string local_3 = JsonConvert.SerializeObject((object) local_2, this.settings);
          byte[] local_4 = Converter.ToBytes(local_3);
          string local_5 = this.GenerateBoundary();
          byte[] local_6 = this.CreateMultipartContent(fileName, fileBytes, local_4, local_5);
          return new DocumentConverter(JsonConvert.DeserializeObject(this.restClient.PostMultipartFile(local_0, local_6, local_5, local_3)), local_1).ToSDKDocument();
        }
        catch (EslServerException exception_0)
        {
          throw new EslServerException("Could not upload document to package. Exception: " + exception_0.Message, exception_0.ServerError, exception_0);
        }
        catch (Exception exception_1)
        {
          throw new EslException("Could not upload document to package. Exception: " + exception_1.Message, exception_1);
        }
      }
    }
Is there a way around the lock with the SDK or do I need to use the REST API?

Subscriptions

Topics Replies Freshness Views Users
Hi, I've been trying to send multiple packages asynchonously.
4 7 years 5 months ago 4
Profile picture for user harishaidary
Hi, I've notice that I can make a document "Accept Only" in the eSignLive sandbox dashboard transaction creation page.
2 7 years 6 months ago 427
Profile picture for user harishaidary
Hi, I'm trying to have my signature field and the date extracted from my PDF document.
2 7 years 10 months ago 29
Profile picture for user harishaidary

Code Share

This user has not submitted any code shares.

Subscriptions Release Notes

This user is not subscribed to any release notes.