Hi @mparvathi_2021,
I have an issue with the image file that I'm sending through JobSubmitService API. I can confirm on my side that the file is existing in the my directory and I think I set the path correctly in the code but when I view it from the web portal, all I see is the cover page and a blank page with an "x" mark. Please see downloaded file below:
Please see the part of the code that attaches the file below:
List attachedFiles = PluginUtil.getOriginalFilePaths(target);
DocDataType data2 =
new DocDataType();
data2.setFormat(DocEncodingFormat.text);
data2.set_value(notes);
DocumentType doc2 =
new DocumentType();
doc2.setDocType(DOCTYPE_TEXT);
doc2.setDocData(data2);
doc2.setRef("test");
ContentPartType part =
new ContentPartType();
part.setDocument(doc2);
part.setTreatment(TreatmentType.body);
int count = 0;
ContentPartType[] partArr = new ContentPartType[attachedFiles.size()+1];
partArr[count] = part;
for (int i = count; i < attachedFiles.size(); i++) {
count++;
doc.setFilename(new EncodableStringType());
System.out.println("attachedFiles.get(i).toString():::::::::::::::::::: "+attachedFiles.get(i).toString());
doc.getFilename().set_value(attachedFiles.get(i).toString());
part = new ContentPartType();
part.setDocument(doc);
part.setTreatment(TreatmentType.attachment);
partArr[count] = part;
}
The code works with no errors and the status code returned is 0.
Can you check what I've done wrong or is there a similar issue that's discussed here in this forum?
Please let me know