<div>Hi,</div>
<div> </div>
<div>I have used a scripted data source & scripted data set in a data design file and inside <em><strong>open</strong></em> event method of <strong>scripted data source</strong>, I am trying to hit the rest service with the help of <em>apache http-client</em> api's and i have already added the referenced jars in Actuate BIRT classpath. </div>
<div>And with the below code, I am getting an error but surprisingly the same piece of code is working fine in <em><strong>open</strong></em> event method of <strong><em>data set</em></strong>.</div>
<div> </div>
<div><em><strong>Code:</strong></em></div>
<div> </div>
<div>
<div>importPackage(Packages.org.apache.commons.httpclient.methods);</div>
<div>importPackage(Packages.org.apache.commons.httpclient);</div>
<div> </div>
<div>
<div>var wfcUrl = "
http://<host_name>/restservice";</div>
<div>var postMethod = new PostMethod(wfcUrl);</div>
</div>
<div>
<div>var httpClient = new HttpClient();</div>
<div> </div>
</div>
</div>
<div><strong><em>Error:</em></strong></div>
<div> </div>
<div>A BIRT exception occurred. See next exception for more information.</div>
<div>ReferenceError: "PostMethod" is not defined.</div>
<div> </div>
<div>Note: My requirement is to invoke the service before describe event of data set, so i can't place the code inside open event of data set. Pls let me know what could be the solution for this interesting or weird problem

</div>