Account
I am a
Developer
Product(s)
Earned badges
Achievement: Latest Unlocked
Preferences
Replies
Topics Started
Topic Started
Topics |
---|
Hi Team,
Need your quick help.
|
HI All,
Can you help me to convert the below API request into equivalent SDK code to create the package(with one document file as attachment to sign off):
{
"name": "packagename",
"status":
|
Replies Created
Reply to: error.eslx.inputValidation.documentPreverifyError
Monday, August 13, 2018 at 08:32amThanks for the quick response. I tried to trigger the package creation REST API using the same PDF and package created successfully. So I guess there is no issue with the PDF. Probably I did something wrong when i tried to create the equivalent java sdk code. You can refer to my other post as well: https://community.onespan.com/forum/api-request-equivalent-sdk-code please guide me.
Reply to: API request into equivalent SDK code
Tuesday, August 14, 2018 at 02:32amHi Duo Ling,
Thanks for the code, I am able to create the package with the above code you shared.
One more followup question, In the current code we have directly provided document path
.withDocument(newDocumentWithName("SaskatchewanLoanProtectionPlan")
.fromFile(URL_PATH)
Instead of file path I have base64 encoded PDF content how can I set the string content as document?
When I tried with below changes I am getting exception:
InputStream is = new ByteArrayInputStream(org.apache.commons.codec.binary.Base64.encodeBase64(docAsBytes));
DocumentBuilder db= newDocumentWithName(name)
.fromStream(is, DocumentType.PDF)
Exception I received is :
Exception in thread "main" com.silanis.esl.sdk.internal.EslServerException: Could not upload document to package. Exception: HTTP POST on URI https://sandbox.esignlive.com/api/packages/ZAZbFqmJ6f-6NUwVg5Qm4jisEjU=/documents resulted in response with status code: [500, Internal Server Error]. Optional details: {"technical":"error.eslx.inputValidation.documentPreverifyError [#32865abc-534f-4e09-9e71-e554114782df]","messageKey":"error.internal.default","message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.","code":500,"name":"Unhandled Server Error"}
at com.silanis.esl.sdk.service.PackageService.uploadApiDocument(PackageService.java:264)
at com.silanis.esl.sdk.service.PackageService.uploadDocument(PackageService.java:249)
at com.silanis.esl.sdk.EslClient.uploadDocument(EslClient.java:598)
at com.silanis.esl.sdk.EslClient.uploadDocument(EslClient.java:610)
at com.silanis.esl.sdk.EslClient.createPackage(EslClient.java:265)
at com.silanis.esl.sdk.EslClient.createAndSendPackage(EslClient.java:452)
at com.goeasy.esb.mule.components.esign.ESignLivePackage.processPackage(ESignLivePackage.java:75)
at com.goeasy.esb.mule.components.esign.ESignLivePackage.main(ESignLivePackage.java:36)
Caused by: com.silanis.esl.sdk.internal.RequestException: HTTP POST on URI https://sandbox.esignlive.com/api/packages/ZAZbFqmJ6f-6NUwVg5Qm4jisEjU=/documents resulted in response with status code: [500, Internal Server Error]. Optional details: {"technical":"error.eslx.inputValidation.documentPreverifyError [#32865abc-534f-4e09-9e71-e554114782df]","messageKey":"error.internal.default","message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.","code":500,"name":"Unhandled Server Error"}
at com.silanis.esl.sdk.internal.RestClient.execute(RestClient.java:192)
at com.silanis.esl.sdk.internal.RestClient.postMultipartFile(RestClient.java:132)
at com.silanis.esl.sdk.service.PackageService.uploadApiDocument(PackageService.java:260)
Note: In both the cases I used the same PDF. which is working when I provide the path, but failing when I provide the stream.
Kindly guide me.
Thanks in advance
Subscriptions
Topics | Replies | Freshness | Views | Users |
---|---|---|---|---|
Hi Team,
Need your quick help.
|
1 | 5 years 2 months ago | 18 | |
Hi,
I am unable to create a package with the JAVA sdk for the attached document. I am getting an eslServerException with a technical message ' error.eslx.inputValidation.documentPreverifyError'.
|
21 | 5 years 5 months ago | 227 | |
HI All,
Can you help me to convert the below API request into equivalent SDK code to create the package(with one document file as attachment to sign off):
{
"name": "packagename",
"status":
|
4 | 5 years 7 months ago | 31 |
Subscriptions Release Notes
This user is not subscribed to any release notes.