Account
Earned badges
Achievement: Latest Unlocked
Preferences
Replies
Topics Started
Topic Started
Topics |
---|
Hello, I recently updated the api version for Silanis.ESL.dll from 10.3 to 10.13, after doing so the code that I'm using to dynamically build the packages for getting signed no longer works.
|
Replies Created
Reply to: Bad Request 400 eslClient.CreatePackage() after upgrade from 10.3 to 10.13
Wednesday, December 7, 2016 at 04:56amPrivate Function createSignerDynamic(cEmail As String, cFirst As String, cLast As String, cCompany As String, cID As String) As Signer Dim s As Signer s = SignerBuilder.NewSignerWithEmail(cEmail) _ .WithFirstName(cFirst) _ .WithLastName(cLast) _ .Build() 'We do not want to have any emails going out to the users s.DeliverSignedDocumentsByEmail = False If Not String.IsNullOrEmpty(cCompany) Then s.Company = cCompany End If If Not String.IsNullOrEmpty(cID) Then s.Id = cID End If Return s End FunctionNow I'll begin looking into what changes might have been made that cause this code to no longer work...
Reply to: Bad Request 400 eslClient.CreatePackage() after upgrade from 10.3 to 10.13
Wednesday, December 7, 2016 at 05:36amOk, after more trial and error using the same technique, I narrowed it down to the following bit of code inside createSignerDynamic:
If Not String.IsNullOrEmpty(cID) Then s.Id = cID End If
I was passing in eSignUser.ID with the value of their email address as I didn't have anything else to use for the signer.Id value. After commenting out this code it was now erroring at:
Dim sessionToken As SessionToken = eslClient.SessionService.CreateSessionToken(packageId, signer.Id)
Which was being caused by signer.Id being Nothing, so I changed that line to the following
Dim sessionToken As SessionToken = eslClient.SessionService.CreateSessionToken(packageId, eSignUser.Email)
And all seems to be well again. So there appears to be an issue with using an email address (SignerBuilder.NewSignerWithEmail()) and then setting the Id to the same email address. However something I found on CreateSessionToken() via google is that starting in API version 10.6 you do not need to set the Custom Id and can just use the email address directly in the call to CreateSessionToken (See here), that's effectively what I'm doing now by commenting out my offending code and changing the one line later on. So now that that's all taken care of, does anyone know of a better way to get error messages out of the ESLClient in .NET in this situation? I feel this could have easily been tracked down had I known more information about what it was complaining about instead of resorting to playing whack-a-mole with commenting out chunks of code..
Subscriptions
Topics | Replies | Freshness | Views | Users |
---|---|---|---|---|
Hello, I recently updated the api version for Silanis.ESL.dll from 10.3 to 10.13, after doing so the code that I'm using to dynamically build the packages for getting signed no longer works.
|
4 | 7 years 4 months ago | 42 |