Closed webdevilopers closed 10 years ago
Hello,
The documentation on community is for the 'old' client that is bundled with JRS in samples/php-client folder. The old client is discontinued as it uses old API, but this one has not officially released yet as a stable version.
You can find the docs for this client in /docs/index_static.html
With regard to the error.. What JRS version are you using? Also to get more information about the error you can catch the exception and look into errorCode and statusCode — what is specified there?
Thanks for the reply @Actine .
Actually I am new to the project that is using Jasper. At the moment is a Ruby On Rails App that uses Tomcat5.5, iReport-2.0.4 and JasperReportsEngine.war as Tomcat Servlet.
Will this actually work with any of the APIs?
@webdevilopers I'm afraid this client will not help you. This is a client for JasperReports Server, a Java-based embeddable web application for storing, scheduling and generating reports (plus enterprise features like ad hoc analysis for commercial licenses). You are using just a library for generating reports. It's the JRS that has REST API, not the library.
If you are developing your own app that incorporates our report generating lib, you'll have to build all API's yourself (and your own client, too) if you need it.
Thanks for the info @Actine . Maybe I can switch to the server version.
I installed the client via composer to integrate it into my ZF2 vendor folder with success. The autoloading works fine.
i followed this example: http://community.jaspersoft.com/questions/822686/how-connect-jasper-reports-php-application
Which is similar to others: http://community.jaspersoft.com/wiki/php-client-sample-code http://community.jaspersoft.com/questions/819111/php-client-php-fatal-error-uncaught-exception-jasperrestrequestexception-message
Dumping the client I recognized that the parameters were not set correctely.
Looking at the constructor the method and its arguments have totally changed:
I changed my code:
This setup seems to be up to date. But it gives the following error: An unexpected HTTP status code was returned by the server.
Furthermore examples in the docs seem to use old code too e.g.:
This method does (no longer) exist. Looks like it was replaced by:
What has happened to the code? How to handle the exception?
I am using Tomcat6. Is Tomcat7 and / or the REST V2 Import Web Service API required?