Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Unable to to upload a RPE report using the API

 Hi Folks, when I try upload a RPE report to RTC using the API, I get the following error message:


'An error ocurred during "Save Report Resource". Report contents are invalid. Cause: invalid CEN header (bad signature)'

The following code fragment may help in understanding this behaviour:

public String replaceReports(IProjectArea prj, String strReportIdentifier, String strRptdesignFilePath, String strDescription) {
IReportManager reportManager = (IReportManager) repo.getClientLibrary(IReportManager.class);
try {
if (!reportManager.doesReportDescriptorExist(prj, strReportIdentifier, null))
return "not found";

//Replace the Report descriptor
IReportDescriptor reportDescriptor = reportManager.fetchReportDescriptor(prj.getItemId().getUuidValue(), strReportIdentifier, null);
InputStream inStream = new FileInputStream(strRptdesignFilePath);
String strContentType ;
IContent newContent = repo.contentManager().storeContent("application/octet-stream", convertStreamToString(inStream), null);
reportDescriptor = (IReportDescriptor) reportDescriptor.getWorkingCopy();
reportDescriptor.setDesignContent("dta", newContent);
reportDescriptor.setDescription(strDescription);
reportManager.saveReportDescriptor(reportDescriptor, null);

I have the following questions:
1. Is the content type correct i.e. "application/octet-stream" ? NB using "text/Plain" seems to work fine for BIRT reports but not for RPE reports.
2. Is this technically possible?

0 votes


Be the first one to answer this question!

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,952

Question asked: Feb 16 '18, 2:29 a.m.

Question was seen: 1,520 times

Last updated: Feb 16 '18, 2:29 a.m.

Confirmation Cancel Confirm