Client library for the JasperServer Web Services API
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


JasperServer4r Library

jasperserver4r is a ruby library for utilising the JasperServer web services API. jasperserver4r allows you to use all the methods defined by the report scheduling service. This library was developed and tested against JasperServer v3.5.0 so it may not work with earlier versions. Support for the repository service is under development. Documentation and comments are a work in progress.

Useful Web Resources


Install from rubyforge:

$ gem install jasperserver4r

The following gem libraries are required:

  • soap4r v1.5.8

  • httpclient v2.1.2 or greater

Using the client library

Basic example

It's pretty easy to use. See for how to set the rubygem environment. Then:

require 'jasperserver4r'
client = username, password )
schedule_service = client.get_report_scheduler_service( endpoint url )
scheduled_jobs = schedule_service.getAllJobs

creates a driver for the JasperServer web services API and retrieves a list of all schedules jobs currently defined in the JasperServer repository. Username and password are valid JasperServer portal credentials. The get_report_scheduler_service endpoint url defaults to localhost:8080/jasperserver/services/ReportScheduler

Will be adding more examples asap. Check out the tests for sample usage of each available operation. The web services guide mentioned above is a good resource for detailed descriptions of available operations.


It is often useful to see a trace of the raw SOAP XML being sent and received. The quickest way of achieving this when debugging your application is by setting the JASPERSERVER4R_DEBUG environment variable to TRUE; e.g. in the bash shell:


or from your Ruby code:


This will output the SOAP XML to stderr, which will usually show up in your terminal window.

There's also the option of logging requests and XML to files. In order to enable this, you should use the write_to_file method of the loggers inside your JasperServer::API object:

client =

This logs the full SOAP XML being sent and received over the wire. These will be written to the current directory by default, but you can specify a path as an optional parameter to log_to_file:


The file will be named soap_xml.

Docs for Developers

$ rake rerdoc

to regenerate the project documentation if needed

$ rake build

to package the gem and create a release

$ rake test

to run unit tests on the library

$ rake -T

for a list of available tasks

Copyright/License Info

Copyright © 2009 all4miller. See MIT-LICENSE for details.