Giter VIP home page Giter VIP logo

jasperserver4r's Introduction

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

Installation

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 docs.rubygems.org/read/chapter/3#page70 for how to set the rubygem environment. Then:

require 'jasperserver4r'
client = JasperServer::API.new( 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.

Logging

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:

$ export JASPERSERVER4R_DEBUG=TRUE

or from your Ruby code:

ENV['JASPERSERVER4R_DEBUG'] = 'TRUE'

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 = JasperServer::API.new
client.xml_logger.log_to_file

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:

client.xml_logger.log_to_file('/var/log/my_app')

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.

jasperserver4r's People

Contributors

all4miller avatar

Stargazers

 avatar  avatar Otávio Sampaio avatar

Watchers

 avatar  avatar

jasperserver4r's Issues

rdoc.info failure - .document file

Hey there just following up on your rdoc.info documentation build failure. Your .document file lists LICENSE as a file to include, but that file doesn't exist in the repo. Looks like it should be called MIT-LICENSE. If you want to correct this and regenerate I suspect it will work fine. If not, just let us know!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.