Getting "Unexpected character encountered...." upon DownloadZippedDocuments
Wednesday, July 3, 2019 at 04:57amHi ,
Please assist with "Could not download the documents to a zip file. Exception: Unexpected character encountered while parsing value: . Path '', line 0, position 0." exception.
Here's the code piece that produces error:
public void downloadDocument(string packageId) {
Logger.Info("DOWNLOADDOCUMENT");
string fileLocation = string.Empty;
try {
var eslClient = new EslClient( C.OSS.API_KEY, C.OSS.API_URL);
var pkgId = new PackageId( packageId);
Logger.Info("C.OSS.API_KEY: " + C.OSS.API_KEY);
Logger.Info("C.OSS.API_URL: " + C.OSS.API_URL);
fileLocation = C.SIGNED_DOCUMENTS_STORAGE_PATH + "\\" + pkgId + "_" + DateTime.Now.ToString("yyyy_MM_dd") + "_" + Guid.NewGuid() + ".zip";
byte[] content = eslClient.DownloadZippedDocuments( pkgId);
Logger.Info("FILE SAVE PATH: " + fileLocation);
File.WriteAllBytes( @fileLocation, content);
} catch (Exception ex) {
Logger.Error("EXCEPTION: " + ex.Message);
Logger.Error("FILE SAVE PATH: " + fileLocation);
throw;
}
}
Here's the trace from the above code:
2019-07-03 09:39:58,810 [10] INFO eSignListener.Controllers.CallbackController - RECEIVED CALLBACK
2019-07-03 09:39:58,857 [10] INFO eSignListener.Controllers.CallbackController - CALLBACK PAYLOAD: {
"@class": "com.silanis.esl.packages.event.ESLProcessEvent",
"name": "PACKAGE_CREATE",
"sessionUser": "FEcgqb15yCME",
"packageId": "unXAewAPSBSA5Nt3YZbqudP0ds0=",
"message": null,
"documentId": null,
"createdDate": "2019-07-03T13:39:58.385Z"
}
2019-07-03 09:39:58,857 [10] INFO eSignListener.Controllers.CallbackController - PROCESSED POST
2019-07-03 09:40:36,983 [8] INFO eSignListener.Controllers.CallbackController - RECEIVED CALLBACK
2019-07-03 09:40:36,983 [8] INFO eSignListener.Controllers.CallbackController - CALLBACK PAYLOAD: {
"@class": "com.silanis.esl.packages.event.ESLProcessEvent",
"name": "PACKAGE_COMPLETE",
"sessionUser": "FEcgqb15yCME",
"packageId": "unXAewAPSBSA5Nt3YZbqudP0ds0=",
"message": null,
"documentId": null,
"createdDate": "2019-07-03T13:40:36.797Z"
}
2019-07-03 09:40:36,983 [8] INFO eSignListener.Controllers.CallbackController - PROCESSED POST
2019-07-03 09:40:36,983 [8] INFO eSignListener.OssCallbackHandler - PACKAGE_COMPLETE
2019-07-03 09:40:36,983 [8] INFO eSignListener.OssService - DOWNLOADDOCUMENT
2019-07-03 09:40:36,999 [8] INFO eSignListener.OssService - C.OSS.API_KEY: xxxxxxxxxxxxx==
2019-07-03 09:40:36,999 [8] INFO eSignListener.OssService - C.OSS.API_URL: http://xxxxxx/api
2019-07-03 09:40:37,046 [8] ERROR eSignListener.OssService - EXCEPTION: Could not download the documents to a zip file. Exception: Unexpected character encountered while parsing value: . Path '', line 0, position 0.
2019-07-03 09:40:37,046 [8] ERROR eSignListener.OssService - FILE SAVE PATH: E:\test\eSign\unXAewAPSBSA5Nt3YZbqudP0ds0=_2019_07_03_ad530161-d4a2-401f-b0ac-d5f7566a3888.zip
Reply to: Getting "Unexpected character encountered...." upon DownloadZippedDocuments
Wednesday, July 3, 2019 at 06:53amReply to: Getting "Unexpected character encountered...." upon DownloadZippedDocuments
Wednesday, July 3, 2019 at 06:06amReply to: Getting "Unexpected character encountered...." upon DownloadZippedDocuments
Wednesday, July 3, 2019 at 06:31am