<p>Hi all.</p>
<p> </p>
<p>Hope you will help me.</p>
<p>I have a requirement to create a web application with Birt reports that will be deployed on IBM Websphere Application Server. Also one of the reports should get the data from web service. So according to manuals I tried two ways to do this:</p>
<p>Scripted Data Source:</p>
<p>1. I created a simple java application, in which created a web service client (all using Eclipse IDE). In this app I made a necessary class that should call web service and receive data from it. There is a method like</p>
<p><em>public List<ToboStatistics> readData(String dateFrom, String dateTo){...}</em></p>
<p>So I tested it - the list of data is returned and all is ok.</p>
<p>Next step - I export this project from Eclipse as the .jar file. And then - add it to my web app Webcontent/WEB-INF/lib folder. Add this jar to classpath of the web app.</p>
<p>Now I create a report, add there Scripted Data Source, then Data Set (with created data source). And then - in the method "open" of the data set - I add next:</p>
<p>importPackage(Packages.ua.com.sbrf);<br>
var myDataSet = new KIRDataSet();<br>
var myData = myDataSet.readData();<br>
myIterator = myData.iterator();</p>
<p> </p>
<p>Everything looks fine. So i also add scripts "fetch" and "close".</p>
<p> </p>
<p>Now i right-click on this report, select "Report -> Run report" and it show necessary data for me. But!</p>
<p>After that i export the project as a .war file and deploy it to WebSphere App Server. The deployment process is standart. Then when I try to run the report I get an error:</p>
<p><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">org.eclipse.birt.report.engine.api.EngineException: There are errors evaluating script "importPackage(Packages.ua.com.sbrf);</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">var myDataSet = new KIRDataSet();</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">var myData = myDataSet.readData1();</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">myIterator = myData.iterator();</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">":</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">Fail to execute script in function __bm_OPEN(). Source:</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">
</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">" + importPackage(Packages.ua.com.sbrf);</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">var myDataSet = new KIRDataSet();</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">var myData = myDataSet.readData();</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">myIterator = myData.iterator();</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">+ "</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">
</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">A BIRT exception occurred. See next exception for more information.</span><br><span style="color:rgb(0,0,0);font-family:monospace;font-size:10.6667px;font-style:normal;font-weight:normal;text-align:left;background-color:rgb(255,255,239);">ReferenceError: "KIRDataSet" is not defined. (/report/data-sets/script-data-set[
@id="5"]/method[
@name="open"]#2).</span><br><br><br>
I completely sure that the jar file with class ua.com.sbrf.KIRDataSet exists and it is in the web-inf/lib folder of the web app. So i can't understand where is the problem???</p>
<p> </p>
<p> </p>
<p>2. Now i try to create a POJO data source with the same classes like in step 1. According to tutorials I created POJO data source, then data set, etc. But when I try to preview result of the data set - i get CalssNotFoundExceptions. And the classes pointed in stack trace are responsible for web service client. So I thought that maybe there are problems in class path of my jar file (with web service client) and exported it with all required libs (jar with jars inside) but this didn't help.</p>
<p> </p>
<p>So what I need - to get the data from outer web service and display it in my report. Any help will be appreciated.</p>
<p> </p>
<p>Thanks!</p>