Home
Analytics
How to pull data from Redmine and Bind it to BIRT
Vinay Lakshman
<p>Guys,</p>
<p> </p>
<p>I have a requirement to pull data from Redmine and bind it to BIRT report. Let me know what options do I have. I know we have REST API for Java to pull the Redmine info but not sure how to bind this to BIRT.</p>
<p>BIRT has Web Service Data Source but if am not wrong it supports only SOAP services.</p>
<p> </p>
<p>Any help would be highly appreciated.</p>
<p> </p>
<p>Regards</p>
<p>Vinay</p>
Find more posts tagged with
Comments
Clement Wong
<p>BIRT can pull data from REST services whether it's XML or JSON format. It will be via a Scripted Data Source/Data Set.</p>
<p> </p>
<p>Here are two DevShare examples that illustrate BIRT consuming data from <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1122-parsing-xml-in-birt-with-e4x/'>XML</a>
; or <a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1128-querying-elasticsearch-with-birt-using-a-scripted-data-set/'>JSON</a>.</p>
;
<p> </p>
<p>As for Redmine, their REST API (<a data-ipb='nomediaparse' href='
http://www.redmine.org/projects/redmine/wiki/Rest_api'>http://www.redmine.org/projects/redmine/wiki/Rest_api</a>)
docs says it can return both XML or JSON.</p>
<p> </p>
<p>Once you decide which format you want back, you will need to consider which authentication scheme that you'll use on your Redmine side. According to their REST API, you have two options, username/password via HTTP Basic authentication or via API key. With HTTP Basic authentication, you can just add the username:password to the URL. If using via API key, you'll need to augment the sample by adding the required HTTP header(s).</p>
Vinay Lakshman
<p>Thanks for the Reply
</p>
<p>I am using Redmine REST API for Java and have written a scripted data source to pull the issues from Redmine and have used Access Key API for request authentication.</p>
<p>The AccessKey and Redmine URL are specified as environment variables.</p>
<p>I am able to pull the issues from Redmine when Java code is executed. But getting attached errors when executing BIRT.</p>
<p>Also attached is source code and rpt file.</p>
<p>Let me know what's wrong with the code.</p>
<p> </p>
<p> </p>
Clement Wong
<p>Sorry, I don't have a Redmine instance available to test the Scripted Data Source/Data Set logic. I was not able to open the "error1.docx" because Word said that it was an invalid file.</p>
<p> </p>
<p>A few things I can think of...</p>
<p> </p>
<p>1. There is a declaration "redmineClass = new Packages.com.test.redmine.PullRedmineData();". Do you have the JAR file? What is the file name? Where did you drop the JAR files in your Designer environment? Do you have the dependent JARs too?</p>
<p> </p>
<p>2. Does your class get called? Do you have any debug statements? Did you run your code in debug mode to trace when executed from the Designer?</p>
<p> </p>
<p>3. As a troubleshooting step, I would use a new blank report and put the code (currently in the open event) that calls your class in the beforeFactory to make sure it works first. The messages from error2 and error3 appears downstream and could be misleading.</p>