1.) I am facing the below issue while trying to bind the return type of document.save(…) with JAXRS.
below is the error:
ERROR org.apache.cxf.jaxrs.utils.JAXRSUtils.logMessageHandlerProblem:1770 - No message body writer has been found for class com.aspose.words.SaveOutputParameters, ContentType: application/pdf
.
Here our return MIME Type is “application/pdf” . Please help me out with same.
FYI, Code Snippet:
SaveOutputParameters saveOutputParameters = document.save(“Test.docx”);
saveOutputParameters.getContentType();
ResponseBuilder resp = Response.ok(saveOutputParameters);
resp.header(“Content-Disposition”, “attachment; filename=”+“Test.docx”);
resp.build();