EslClient createPackage not working on MAC
Tuesday, November 21, 2017 at 09:35amPackageId packageId = client.createPackage(superDuperPackage3);
This works on Windows but when I run it on a MAC I get an EslException with a getLocalizedMessage() of "Could not create a new package"
I am running it on macOS High Sierra (version 10.13.1)
Reply to: EslClient createPackage not working on MAC
Friday, November 24, 2017 at 08:43amReply to: EslClient createPackage not working on MAC
Wednesday, November 22, 2017 at 08:57amReply to: EslClient createPackage not working on MAC
Friday, November 24, 2017 at 08:41amReply to: EslClient createPackage not working on MAC
Friday, November 24, 2017 at 08:45amWon't let me send a file so here is the code: package com.esignlive.example; import static com.silanis.esl.sdk.builder.DocumentBuilder.newDocumentWithName; import static com.silanis.esl.sdk.builder.PackageBuilder.newPackageNamed; import static com.silanis.esl.sdk.builder.SignatureBuilder.signatureFor; import static com.silanis.esl.sdk.builder.SignerBuilder.newSignerWithEmail; import java.io.PrintStream; import java.util.Date; import com.silanis.esl.sdk.DocumentPackage; import com.silanis.esl.sdk.EslClient; import com.silanis.esl.sdk.EslException; import com.silanis.esl.sdk.PackageId; import com.silanis.esl.sdk.TextAnchorPosition; import com.silanis.esl.sdk.builder.TextAnchorBuilder; import com.silanis.esl.sdk.internal.EslServerException; public class TextAnchor { private static final PrintStream o = System.out; //replace api_key placeholder with your own value private static final String API_KEY = ""; public static final String API_URL = "https://sandbox.esignlive.com/api"; public static String clientEmail = null, clientLN = null, clientFN = null; public static String contrEmail = null, contrLN = null, contrFN = null; public TextAnchor(String clem, String clln, String clfn, String coem, String coln, String cofn) { clientEmail = clem; clientLN = clln; clientFN = clfn; contrEmail = coem; contrLN = coln; contrFN = cofn; } public static void main(String[] args) { try { new TextAnchor("[email protected]", "Eldred", "Mike", "[email protected]", "Cathro", "Paul"); //clientEmail = "[email protected]"; o.println("Client Email\t\t=\t" + clientEmail); o.println("Client First Name\t=\t" + clientFN); o.println("Client Last Name\t=\t" + clientLN); o.println("Contractor Email\t\t=\t" + contrEmail); o.println("Contractor First Name\t=\t" + contrFN); o.println("Contractor Last Name\t=\t" + contrLN); EslClient client = new EslClient(API_KEY, API_URL); //DocumentPackage superDuperPackage3 = newPackageNamed("02/02/2017 HCS WIN Comm") DocumentPackage superDuperPackage3 = newPackageNamed("Text Anchor Extraction Example Java SDK") .expiresAt( DateUtil.addDays(new Date(), 90) ) .withSigner(newSignerWithEmail(clientEmail) .withFirstName(clientFN) .withLastName(clientLN) .withEmailMessage("This is an example of adding custom text to the e-Signature email-Client\r\n\r\nWhatcha think Mike????") //.withCustomId("client") .signingOrder(2)) .withSigner(newSignerWithEmail(contrEmail) .withFirstName(contrFN) .withLastName(contrLN) .withEmailMessage("This is an example of adding custom text to the e-Signature email-IBM") //.withCustomId("contractor") .signingOrder(1)) //.withDocument(newDocumentWithName("02/02/2017 HCS WIN Comm") .withDocument(newDocumentWithName("Sample Contract") .withId("CustDocID00001") .fromFile("/Users/cathrop/Documents/ITSEXPPRUSME68S93115CLETTER.pdf") //.fromFile("C:\\$User\\GTS\\ITS Express\\e-signature\\cleaning_contract.pdf") //.fromFile("C:\\$User\\GTS\\ITS Express\\e-signature\\ITSEXPPRUSME68S93115CLETTER.pdf") .enableExtraction() .withSignature(signatureFor(clientEmail) .withPositionAnchor(TextAnchorBuilder.newTextAnchor("Authorized signature-Client") .atPosition(TextAnchorPosition.TOPLEFT) .withSize(150, 40) .withOffset(0, -50) .withCharacter(0) .withOccurence(0))) .withSignature(signatureFor(contrEmail) .withPositionAnchor(TextAnchorBuilder.newTextAnchor("Authorized signature-IBM") .atPosition(TextAnchorPosition.TOPLEFT) .withSize(150, 40) .withOffset(0, -50) .withCharacter(0) .withOccurence(0)))) .build(); PackageId packageId = client.createPackage(superDuperPackage3); o.println("packageId\t=\t" + packageId); // Send the package to be signed by the participants client.sendPackage(packageId); } catch (EslServerException eslServerException) { getEslServerException(eslServerException); } catch (EslException eslException) { getEslException(eslException); } catch (Exception ex) { getException(ex); } finally { getFinally(); } } private static void getException(Exception ex) { o.println("Caught a: " + ex.getClass().getName()); o.println("Message: " + ex.getMessage()); o.println("Stacktrace follows:....."); ex.printStackTrace(o); } private static void getFinally() { try { System.gc(); } catch (Exception e) { e.printStackTrace(o); } } private static void getEslServerException(EslServerException eslServerException) { // The request was refused by the server for some reason... o.println(eslServerException.getLocalizedMessage()); o.println(eslServerException.getServerError().getCode().toString()); o.println(eslServerException.getServerError().getMessage()); o.println(eslServerException.getServerError().getTechnical()); } private static void getEslException(EslException eslException) { o.println(eslException.getLocalizedMessage()); o.println(eslException.getCause().getMessage()); o.println(eslException.getMessage()); } }
Reply to: EslClient createPackage not working on MAC
Monday, November 27, 2017 at 06:10amReply to: EslClient createPackage not working on MAC
Monday, November 27, 2017 at 10:32amReply to: EslClient createPackage not working on MAC
Monday, November 27, 2017 at 11:07am