Jump to content
We've recently updated our Privacy Statement, available here ×

lupes

Members
  • Posts

    5
  • Joined

  • Last visited

lupes's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. hi i insert the line in the file and copy the las line from the logfile: 16:42:12,019 WARN LoggerListener,http-8080-Processor24:55 - Authentication event AuthenticationSuccessEvent: jasperadmin; details: org.acegisecurity.ui.WebAuthenticationDetails@957e: RemoteIpAddress: 127.0.0.1; SessionId: null 16:42:12,019 ERROR ManagementService,http-8080-Processor24:186 - Encapsulation DIME? : false hope it help you :blush:
  2. Yes i can connecting from i-report with jasperserverplugin but when i call the function from ruby i get the msg from Jasperserver log "ERROR ManagementService, http-8080-Processor 25:186-Encapsulation DIME? false can that be a risen why not works?
  3. i try a simple test: i have a function def self.get_list() strUser = 'user' strPWD = 'password' strServer = 'http://localhost:8080/jasperserver/services/repository' strURI = %q{<?xml version="1.0" encoding="UTF-8"?> <request> <operation-name>list</operation-name> <resource-descriptor read-only="false" control-type="0" is-reference="false" is-new="false" strict-max="false" data-type="0" mandatory="false" has-data="false" strict-min="false" main-report="false" version="0"> <uri-string>/reports</uri-string><ws-type>folder</ws-type> </resource-descriptor></request> } driver = SOAP::RPC::Driver.new(strServer) driver.wiredump_dev = STDERR driver.options["protocol.http.basic_auth"] << [strServer, strUser, strPWD] driver.add_method('list','request') puts driver.list(strURI) ////////////////////////////////////// and i call the function in the consol and i get the follow msg back: ////////////////////////////////// d=Reports.get_list() <?xml version="1.0" encoding="UTF-8"?> <operationResult version="2.0.1"> <returnCode><![CDATA[0]]></returnCode> </operationResult> => nil why nil???? Post edited by: lupes, at: 2008/02/19 10:17
  4. hi and thank you for your help i implement the follow example in my project: //////////////////////////////////// require 'rexml/document' class ReportsController < ApplicationController include SendDoc def index @jasperServer ="http://10.16.22.230:8080/jasperserver/services/repository" @jasperUser = "jasperadmin" @jasperPass = "password" @jasperURI = '/reports'#'/reports/samples' @reportsXML = Reports.get_list(@jasperServer, @jasperUser, @jasperPass, @jasperURI) doc = REXML::Document.new(@reportsXML) @report_names = [] @report_labels = [] @res_type = [] @parent_folder = [] doc.elements.each('operation-result/resource-descriptors/name') do |ele| @report_names << ele.text print ele.text end doc.elements.each('operation-result/resource-descriptors/label') do |ele| @report_labels << ele.text end doc.elements.each('operation-result/resource-descriptors/resource-type') do |ele| @res_type << ele.text end doc.elements.each('operation-result/resource-descriptors/parent-folder') do |ele| @parent_folder << ele.text end end def run @jasperServer ="http://10.16.22.230:8080/jasperserver/services/repository" @jasperUser = "jasperadmin" @jasperPass = "password" @reportName = params[:reportURI].gsub(///, '_') @report = send_doc(@jasperServer, @jasperUser, @jasperPass, @reportName, params[:reportURI], params[:format]) end end ##### end app/controllers/reports_controller.rb module SendDoc def send_doc(strURL, strUser, strPass, strReportName, strReportURI, strOutputFmt) case strOutputFmt when 'PDF' mime_type = 'application/pdf' extension = 'pdf' else #rtf mime_type = 'application/rtf' extension = 'rtf' end send_data Reports.get_report(strURL, strUser, strPass, strReportURI, strOutputFmt), :filename => "#{strReportName}.#{extension}", :type => mime_type, :disposition => 'inline' end end ##### end app/helpers/send_doc.rb ##### require 'soap/rpc/driver' class Reports < ActiveRecord::Base class << self def get_list(strURL, strUser, strPass, strURI) strRequestBody = %Q|<?xml version="1.0" encoding="UTF-8"?> <request> <operation-name>list</operation-name> <resource-descriptor read-only="false" control-type="0" is-reference="false" is-new="false" strict-max="false" data-type="0" mandatory="false" has-data="false" strict-min="false" main-report="false" version="0"> <uri-string>{strURI}</uri-string><ws-type>folder</ws-type> </resource-descriptor></request> | driver = SOAP::RPC::Driver.new(strURL) driver.options["protocol.http.basic_auth"] << [strURL, strUser, strPass] driver.add_method('list','request') @report_list = driver.list(strRequestBody) end def get_report(strURL, strUser, strPass, strURI, strOutputFmt) strRequestBody = %Q|<?xml version="1.0" encoding="UTF-8"?> <request><operation-name>runReport</operation-name><resource-descriptor read-only="false" control-type="0" is-reference="false" is-new="false" strict-max="false" data-type="0" mandatory="false" has-data="false" strict-min="false" main-report="false" version="0"> <uri-string>#{strURI}</uri-string></resource-descriptor> <arguments xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="java:com.jaspersoft.jasperserver.api.metadata.xml.domain.impl.Argument"> <name>RUN_OUTPUT_FORMAT</name><value>#{strOutputFmt}</value></arguments></request> | driver = SOAP::RPC::Driver.new(strURL) driver.options["protocol.http.basic_auth"] << [strURL, strUser, strPass] driver.add_method('runReport','request') report = driver.runReport(strRequestBody)["Include"].content report end end end /////////////////////////////// <% @page_title = 'Reports' %> Folder: <%= @parent_folder[0] %><br/><br/> <% @report_names.each_with_index do |name, idx| %> <% if @res_type[idx] == 'com.jaspersoft.jasperserver.api.metadata.jasperreports.domain.ReportUnit' %> <li><%= @report_labels[idx] %> <%= link_to(image_tag("/images/pdf.gif", :border => 0), :controller => "reports", :action => "run", :reportURI => "#{@jasperURI}/#{name}", :format => 'PDF') %> <% end %> <% end %> ///// so far so good but i get no items in the list why:-(
  5. hi, i am beginner and i would call a ireport with help from webservice(jasperservice). How can i do this with Ruby on Rails, i now there is a php help in the dir from Jasperserver but dont now how i can do it with Ruby on Rails. Have anybody a idea?? :(
×
×
  • Create New...