Hi there!
The WebService Data Source works like a charme inside the Jaspersoft Studio and in the JasperReports Server Pro.
Now I try to ceate a basic Java Class which should create the report using the API.
And here is my problem at all - is there any example available for generating a PDF file out of a report which uses the Web Service Data Source?
I struggle with the Fill Manager...
I used the WebServiceDataAdapterServiceFactory to contribute the Report Parameters Map and this seems to be working.
I feel close to a solution but I cannot see one actually :)
Best regards,
5 Answers:
I have the same problem.
I try to write code for my servlet, but i didn't find docs.
I have created jrxml from jasper studio and work great, but i do not have example to use it in my java code.
I try with kavinb code without success. Can someone share docs or code?
Best regards.
Marcello
Seconding Edwin L, is there a working example of running a report from java? My reports run just fine from within JaspersoftStudio, but am getting the same NPE as described above by Kevin.
Any help would be appreciated,
Howard
Here's some additional info,
- I was able to trace the NPE to be in the WebServiceQueryExecuter.class, it tries to connect to the web service providing the data for the report. Based on the debugger, all of the urls and parameters for the web service are being pulled in correctly from the report file (.jasper).
- To do the connection, it uses the method 'callWS' from the WebServiceConnector.class. This method returns a null, which then causes the exception quoted in the issue 'com.jaspersoft.webservice.data.query.WebServiceQueryExecuter.getInternalQE(WebServiceQueryExecuter.java:243)'.
Here is the full stack trace, if that helps,
Whew, that was a dilly of a problem. As it turns out the Web Service DataSource is notoriously bad at letting you know what's going on. As it turned out, once I added httpclient-4.3.6.jar to my build path, it worked!!
So, the final list of jars that I added to the build path are:
With this I'll get a NPE at com.jaspersoft.webservice.data.query.WebServiceQueryExecuter.getInternalQE(WebServiceQueryExecuter.java:243)
complete sample: