I'm using iReport and JasperServer Pro 4.7, and am wanting to call the runReport method on WSClient in a Java servlet.
The problem I'm having, is locating the required JARs/Libaries to run the following piece of code:
JServer js = new JServer();
ResourceDescriptor rd = new ResourceDescriptor();
Map params = new HashMap();
WSClient client = new WSClient(js);
JasperPrint jasperPrint = client.runReport(rd, params);
I've attached the following libraries to my Java application:
What library do I need to use the JasperPrint object? I've tried using jasperreports-4.7.jar, however at runtime, I'm getting dependency exceptions for "java.lang.NoClassDefFoundError: com/jaspersoft/ireport/designer/IReportManager"
The Web Services documentation is very thin on details.
Any help would be great.
There is a sample with the JasperServer Distribution on using the API you will find it in <js-install-path>/samples/java-webapp-sample/ you will find a working sample there and also the WSClient.java class is there. Remember that you will be using the Server API (either SOAP or REST) so you will not need the Jasper Library in your application.
The also the Jersey library is really good if you are using the REST API http://www.mkyong.com/webservices/jax-rs/restful-java-client-with-jersey-client/
This link may be able to help you also, it looks a bit old but it should give you some guidance: http://www.jaspersoft.com/sites/default/files/downloads/Jaspersoft-api-wp.pdf and of course the Web Services Guide http://community.jaspersoft.com/sites/default/files/docs/jasperreports-server-web-services-guide.pdf