Session token on NEW INSTANCE/UI is poining to OLD UI
Friday, November 4, 2016 at 07:10amHi,
i have a problem when trying to generate a URL with sender authentication token to package view.
When i do that on old-instance (sandbox.e-signlive.ca) its working fine.
But when i do that on new-instance(sandbox.esignlive.com) its not working fine reps the UI looks the old way.
Is there a way how to do this for NEW UI ? to generate an URL to package or designer view with sender authentication token?
Do i need to use newer version of SDK or use some parameter when generating it (which i did not find in the source code)?
We are using SDK version 11.0
Here is the code to generate the token:
private String getRedirectToPackageViewForSender(EslClient eslClient, AuthenticationClient authenticationClient, PackageId packageId) {
final String senderAuthenticationToken = eslClient.getAuthenticationTokensService().createSenderAuthenticationToken(packageId.getId());
String redirectToPackageViewForSender = authenticationClient.buildRedirectToPackageViewForSender(senderAuthenticationToken, packageId.getId());
return redirectToPackageViewForSender;
}
So the generated URL is for example is for OLD UI - Canada instance:
https://sandbox.e-signlive.ca/auth?authenticationToken=NzNlMDllODEtYTFkNy00YzE1LWFmZjYtMTRhYTZiOWIxN2Uy&target=https%3A%2F%2Fsandbox.e-signlive.ca%2Fpackages%2Fab1059a6-cbf5-4552-92ec-6516bcec6d73
and when i login to OLD UI the URLs are :
https://sandbox.e-signlive.ca/packages/drafts https://sandbox.e-signlive.ca/packages/ab1059a6-cbf5-4552-92ec-6516bcec6d73 https://sandbox.e-signlive.ca/packages/ab1059a6-cbf5-4552-92ec-6516bcec6d73/documents/e7c1322c9ff76479etc. The thing is when i switch to new instance -> https://sandbox.esignlive.com Then build the package there with the same code (just EslClient is configured to use this new API key and Url) Then the generated URL is still the same: https://sandbox.esignlive.com/auth?authenticationToken=N2JkZTEyMzItYmUzMS00ODUwLWI0YWMtNmI4N2NjZWJkOTkw&target=https%3A%2F%2Fsandbox.esignlive.com%2Fpackages%2Fbzj5ef0fi6O0-t19Zb4UYLu7bRE%3D !!! When i open the overlay it is opened as old UI !!!! BUT!!! When i login to Web UI and look into the url for example for the package view or the document view it has /a/ in URL which old instance does not have (and in fact the URLs are different, there is /a/transaction/{pacakgeId} )
https://sandbox.esignlive.com/a/dashboard https://sandbox.esignlive.com/a/transaction/FgymOlo51cK9ZN-EG4RY-cHSxUs= https://sandbox.esignlive.com/a/transaction/GpjvMV2aIVfx8CI1i-dm63UVjCU=/designetc. I looked into source code in UrlTemplate.java and there is no mention about "/a/" etc which is used as URL for new UI. The second thing is that i cannot upload the document to package when using new INSTANCE: The code fails on call: eslClient.uploadDocument(document, documentPackage);
com.silanis.esl.sdk.EslException: Could not upload document to package. at com.silanis.esl.sdk.service.PackageService.uploadApiDocument(PackageService.java:257) at com.silanis.esl.sdk.service.PackageService.uploadDocument(PackageService.java:240)Any known issues with that? Probably the URL/REST call is different on new instance so thats why the call fails...
Reply to: Session token on NEW INSTANCE/UI is poining to OLD UI
Friday, November 4, 2016 at 08:23amReply to: Session token on NEW INSTANCE/UI is poining to OLD UI
Monday, November 7, 2016 at 04:18am@Test public void testDocumentPackageSettings() { System.out.println("== testDocumentPackageSettings =="); String DECLINE_REASON_1 = "Decline reason One"; String DECLINE_REASON_2 = "Decline reason Two"; String DECLINE_REASON_3 = "Decline reason Three"; String OPT_OUT_REASON_1 = "Opt out reason One"; String OPT_OUT_REASON_2 = "Opt out reason Two"; String OPT_OUT_REASON_3 = "Opt out reason Three"; String HAND_OVER_LINK_HREF = "http://www.google.ca"; String HAND_OVER_LINK_TEXT = "click here"; String HAND_OVER_LINK_TOOLTIP = "link tooltip"; DocumentPackage superDuperPackage = PackageBuilder.newPackageNamed( "Custom " + new SimpleDateFormat( "HH:mm:ss" ).format( new Date() ) ) .withSettings( DocumentPackageSettingsBuilder.newDocumentPackageSettings() .withInPerson() .withoutLanguageDropDown() .hideOwnerInPersonDropDown() .disableFirstAffidavit() .disableSecondAffidavit() .withDecline() .withDeclineReason(DECLINE_REASON_1) .withDeclineReason(DECLINE_REASON_2) .withDeclineReason(DECLINE_REASON_3) .withOptOut() .withOptOutReason(OPT_OUT_REASON_1) .withOptOutReason(OPT_OUT_REASON_2) .withOptOutReason(OPT_OUT_REASON_3) .withHandOverLinkHref(HAND_OVER_LINK_HREF) .withHandOverLinkText(HAND_OVER_LINK_TEXT) .withHandOverLinkTooltip(HAND_OVER_LINK_TOOLTIP) .withDialogOnComplete() .withCeremonyLayoutSettings( CeremonyLayoutSettingsBuilder.newCeremonyLayoutSettings() .withoutGlobalConfirmButton() .withoutGlobalSaveAsLayoutButton() ) ) .build(); PackageId myPackageId = eslClient.createPackage( superDuperPackage ); System.out.println("myPackageId: " + myPackageId); Signer signer = SignerBuilder.newSignerWithEmail(SIGNER_FRST_EMAIL) .withFirstName(SIGNER_FRST_FIRST_NAME) .withLastName(SIGNER_FRST_LAST_NAME) .build(); superDuperPackage = eslClient.getPackage(myPackageId); eslClient.getPackageService().addSigner(superDuperPackage.getId(), signer); Document document = DocumentBuilder.newDocumentWithName("DOCUMENT_SETUP_NAME") .withDescription("TEST_DOC_FILE_NAME_DOC_PDF_STREAM") .fromStream( loadDocumentInputStream("document-with-fields.pdf"), DocumentType.PDF ) .build(); superDuperPackage = eslClient.getPackage(myPackageId); //Add document to the existing package document = eslClient.uploadDocument(document, superDuperPackage); System.out.println("== testDocumentPackageSettings PASSED =="); }Then failing line is in SignatureConverter.toSDKSignature:66 signatureBuilder is null NOTE: on the OLD instance its working fine Here is the full trace:Reply to: Session token on NEW INSTANCE/UI is poining to OLD UI
Wednesday, November 9, 2016 at 08:50amReply to: Session token on NEW INSTANCE/UI is poining to OLD UI
Friday, November 11, 2016 at 03:38amReply to: Session token on NEW INSTANCE/UI is poining to OLD UI
Monday, November 14, 2016 at 03:08amDocumentPackage pack = PackageBuilder.newPackageNamed("Testing in Person!") .withSigner(SignerBuilder.newSignerWithEmail("[email protected]") .withFirstName("John") .withLastName("Smith") .withCustomId("signer1")) .withSigner(SignerBuilder.newSignerWithEmail("[email protected]") .withFirstName("Mary") .withLastName("Doe") .withCustomId("signer2")) .withDocument(DocumentBuilder.newDocumentWithName("some doc") .fromFile("C:/Users/hhaidary/Desktop/PDFs/doc1.pdf") .withSignature(SignatureBuilder.captureFor("[email protected]") .atPosition(100, 100) .onPage(0)) .withSignature(SignatureBuilder.signatureFor("[email protected]") .atPosition(200, 200) .onPage(0))) .build(); PackageId packageId = eslClient.createPackage(pack);Reply to: Session token on NEW INSTANCE/UI is poining to OLD UI
Monday, November 14, 2016 at 04:27amReply to: Session token on NEW INSTANCE/UI is poining to OLD UI
Monday, November 14, 2016 at 04:50am- Delete all the form fields from the pdf.
- Rename all the form fields as per the esignlive convention and use the document extraction feature
Here's an example of a test I ran with the document you provided using document extraction: