name cannot be null or empty
Thursday, March 22, 2018 at 07:56amWhile attempting to upload a document to a package via the following call:
https://sandbox.esignlive.ca/api/packages/9uPhYzkvKRJXmdxv4Bje_7gz9Ls=/documentsI am presented with the following error:
POST https://sandbox.e-signlive.ca/api/packages/9uPhYzkvKRJXmdxv4Bje_7gz9Ls=/documentsresulted in a500 Internal Server Error` response:
{"code":500,"messageKey":"error.internal.default","technical":"name cannot be null or empty","message":"Unexpected error
I did manage to view the entire body of the error message and it was a generic default error message.
Here is the document JSON given as an argument to the upload function:
{
"fields": [],
"id": "contract",
"name": "BidSettle_Contract-268-2018-03-22",
"size": 0,
"index": 0,
"description": "DOCUMENT DESCRIPTION L7",
"approvals": [
{
"fields": [
{
"type": "INPUT",
"top": 549,
"left": 414,
"width": 119,
"height": 30,
"subtype": "TEXTFIELD",
"id": "location",
"value": "",
"validation": {
"required": true
},
"page": 0,
"extract": false
},
{
"type": "INPUT",
"top": 549,
"left": 563,
"width": 119,
"height": 30,
"name": "",
"value": "MMMM dd, yyyy",
"binding": "{approval.signed}",
"subtype": "LABEL",
"id": "YUPpJcTscHUU",
"page": 0,
"extract": false
},
{
"type": "SIGNATURE",
"top": 600,
"left": 410,
"width": 200,
"height": 40,
"value": "",
"name": "",
"subtype": "CAPTURE",
"id": "CWcN4vO1sjo0",
"page": 0,
"extract": false
},
{
"type": "INPUT",
"top": 650,
"left": 410,
"width": 150,
"height": 30,
"name": "",
"binding": "{signer.name}",
"subtype": "LABEL",
"id": "MNidJWwjJAY4",
"page": 0,
"extract": false
},
{
"extract": true,
"extractAnchor": {
"text": "Confidentiality",
"index": 0,
"leftOffset": 10,
"topOffset": 10,
"width": 200,
"height": 300,
"characterIndex": 0,
"anchorPoint": "TOPLEFT"
},
"name": "SIGNATURE",
"subtype": "CAPTURE",
"type": "SIGNATURE"
}
],
"role": "Signer1319",
"id": "signature"
}
],
"extract": false
}
We DO have a new development environment URL. I thought that maybe the esign sandbox needs to have specific domains registered and maybe that was the cause of the error but I don't see anywhere to register a new one on the console.
HELP!! PLEASE!!!
Reply to: name cannot be null or empty
Monday, March 26, 2018 at 06:11amPOST https://sandbox.e-signlive.ca/api/packages/rRCwylxnlW_HZHc1VJuEijeYdlw=/documents HTTP/1.1 Authorization: Basic my_api_key Accept: text/html cache-control: no-cache Postman-Token: 4d660b61-2665-4e35-8e6f-868436c9580f User-Agent: PostmanRuntime/7.1.1 Host: sandbox.e-signlive.ca accept-encoding: gzip, deflate content-type: multipart/form-data; boundary=--------------------------384576484415692171392150 content-length: 31976 Connection: close ----------------------------384576484415692171392150 Content-Disposition: form-data; name="payload" {"fields":[],"id":"contract","name":"BidSettle_Contract-292-2018-03-23","size":0,"index":0,"description":"DOCUMENT DESCRIPTION L7","approvals":[{"fields":[{"type":"INPUT","top":549,"left":414,"width":119,"height":30,"subtype":"TEXTFIELD","id":"location","value":"","validation":{"required":true},"page":0,"extract":false},{"type":"INPUT","top":549,"left":563,"width":119,"height":30,"name":"","value":"MMMM dd, yyyy","binding":"{approval.signed}","subtype":"LABEL","id":"YUPpJcTscHUU","page":0,"extract":false},{"type":"SIGNATURE","top":600,"left":410,"width":200,"height":40,"value":"","name":"","subtype":"CAPTURE","id":"CWcN4vO1sjo0","page":0,"extract":false},{"type":"INPUT","top":650,"left":410,"width":150,"height":30,"name":"","binding":"{signer.name}","subtype":"LABEL","id":"MNidJWwjJAY4","page":0,"extract":false},{"extract":true,"extractAnchor":{"text":"Confidentiality","index":0,"leftOffset":10,"topOffset":10,"width":200,"height":300,"characterIndex":0,"anchorPoint":"TOPLEFT"},"name":"SIGNATURE","subtype":"CAPTURE","type":"SIGNATURE"}],"role":"Signer1319","id":"signature"}],"extract":false} ----------------------------384576484415692171392150 Content-Disposition: form-data; name="file"; filename="BidSettle_Contract-292-2018-03-23.pdf" Content-Type: application/pdf %PDF-1.4 1 0 obj ...... [pdf bytes] ----------------------------384576484415692171392150--Is your request similar to the above in terms of headers? (minus of course the user-agent and postman-token). I would also advise opening a ticket with our support team if you haven't done so already. [email protected]Reply to: name cannot be null or empty
Thursday, March 22, 2018 at 08:15amReply to: name cannot be null or empty
Thursday, March 22, 2018 at 08:55amReply to: name cannot be null or empty
Thursday, March 22, 2018 at 09:15am{ "fields": [], "id": "contract", "name": "BidSettle_Contract-268-2018-03-22", "size": 0, "index": 0, "description": "DOCUMENT DESCRIPTION L7", "approvals": [ { "fields": [ { "type": "INPUT", "top": 549, "left": 414, "width": 119, "height": 30, "subtype": "TEXTFIELD", "id": "location", "value": "", "validation": { "required": true }, "page": 0, "extract": false }, { "type": "INPUT", "top": 549, "left": 563, "width": 119, "height": 30, "name": "", "value": "MMMM dd, yyyy", "binding": "{approval.signed}", "subtype": "LABEL", "id": "YUPpJcTscHUU", "page": 0, "extract": false }, { "type": "SIGNATURE", "top": 600, "left": 410, "width": 200, "height": 40, "value": "", "name": "", "subtype": "CAPTURE", "id": "CWcN4vO1sjo0", "page": 0, "extract": false }, { "type": "INPUT", "top": 650, "left": 410, "width": 150, "height": 30, "name": "", "binding": "{signer.name}", "subtype": "LABEL", "id": "MNidJWwjJAY4", "page": 0, "extract": false } ], "role": "Signer1319", "id": "signature1" }, { "fields": [ { "extract": true, "extractAnchor": { "text": "Confidentiality", "index": 0, "leftOffset": 10, "topOffset": 10, "width": 200, "height": 300, "characterIndex": 0, "anchorPoint": "TOPLEFT" }, "name": "SIGNATURE", "subtype": "CAPTURE", "type": "SIGNATURE" } ], "role": "Signer1319", "id": "signature2" } ], "extract": false }Reply to: name cannot be null or empty
Thursday, March 22, 2018 at 09:18amReply to: name cannot be null or empty
Thursday, March 22, 2018 at 09:23amReply to: name cannot be null or empty
Thursday, March 22, 2018 at 10:37amReply to: name cannot be null or empty
Monday, March 26, 2018 at 03:56amReply to: name cannot be null or empty
Monday, March 26, 2018 at 05:17amReply to: name cannot be null or empty
Monday, March 26, 2018 at 08:22amReply to: name cannot be null or empty
Tuesday, March 27, 2018 at 10:17amString basicAuthentication = "Basic API Key"; String boundary = Long.toHexString(System.currentTimeMillis()); ClientRequest cr = new ClientRequest("https://sandbox.esignlive.com/api/packages/") .header(HttpHeaders.AUTHORIZATION, basicAuthentication); cr.accept(MediaType.APPLICATION_JSON_TYPE); MultipartFormDataOutput mro = new MultipartFormDataOutput(); OutputPart filePart = mro.addFormData("file", new FileInputStream("C:\\esign\\My File_Edit.pdf"), MediaType.APPLICATION_OCTET_STREAM_TYPE); mro.addFormData("payload", eSignLivePackage, MediaType.APPLICATION_JSON_TYPE); cr.body("multipart/form-data",mro);And if I use code,String basicAuthentication = "Basic API Key"; String boundary = Long.toHexString(System.currentTimeMillis()); ClientRequest cr = new ClientRequest("https://sandbox.esignlive.com/api/packages/") .header(HttpHeaders.AUTHORIZATION, basicAuthentication); cr.accept(MediaType.APPLICATION_JSON_TYPE); MultipartFormDataOutput mro = new MultipartFormDataOutput(); OutputPart filePart = mro.addFormData("file", new FileInputStream("C:\\esign\\My File_Edit.pdf"), MediaType.APPLICATION_OCTET_STREAM_TYPE); filePart.getHeaders().add("Content-Disposition: ", "form-data; name=\"file\"; filename=\""+ "My File_Edit.pdf"); mro.addFormData("payload", eSignLivePackage, MediaType.APPLICATION_JSON_TYPE); cr.body("multipart/form-data",mro);then get error: "technical":"Number of uploaded files does not match number of documents specified in package.","messageKey":"error.validation.package.wrongNumberOfFiles","message":"Number of uploaded files does not match number of documents specified in package.","code":400,"name":"Validation Error"} Please help me figure out whats missing here.Reply to: name cannot be null or empty
Tuesday, March 27, 2018 at 10:36amReply to: name cannot be null or empty
Tuesday, March 27, 2018 at 11:05amfilePart = mro.addFormData("file", new FileInputStream("C:\\esign\\My_test.pdf"), MediaType.APPLICATION_OCTET_STREAM_TYPE); filePart.getHeaders().add("Content-Disposition", "form-data; name=\"file\"; filename=\"" +"My_test.pdf" +"\""); OutputPart filePart1 = mro.addFormData("file1", new FileInputStream("C:\\esign\\PDFFile.pdf"), MediaType.APPLICATION_OCTET_STREAM_TYPE); filePart1.getHeaders().add("Content-Disposition", "form-data; name=\"file\"; filename=\"PDFFile.pdf\""); mro.addFormData("payload", eSignLivePackage, MediaType.APPLICATION_JSON_TYPE);