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

kessleag

Members
  • Posts

    4
  • Joined

  • Last visited

kessleag's Achievements

Rookie

Rookie (2/14)

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

Recent Badges

0

Reputation

  1. I did in fact find a solution: It was to use iframe to call the Jasperserver url, this allows me to access all my reports and junk through an external html file. Although I still wish to make this code work because it's been a good learning experience and I want to see this through to the end.
  2. Okay so creating a new variable called baseRequest and using that in all my statements worked up until the last GET statement, so the "full authentication" error was being caused by cookies being disabled by default.
  3. So I have code that's based off the format of http://community.jaspersoft.com/questions/541220/run-report-jasperserver-rest-web-services. I have everything up and running except for the last Get statement, each time it says "uuid not found in session" and this is because each time I run it the uuid is different, so how am I supposed to use the uuid if it's not static? Here's a example of what I'm working with: http://localhost:8080/jasperserver/rest/report/path-to-report/uuid?file=report
  4. I'm new to Jasperserver but through multiple iterations I've been able to come up with this: //CODE var request = require("request"), qs = require('querystring'), url = 'localhost:8080/jasperserver/rest/resource/reports/test/UserReports', baseRequest = request.defaults({ jar: true });baseRequest.post({ url: "http://localhost:8080/jasperserver/rest/login?j_username=jasperadmin&j_password=jasperadmin"}, function (e, r, body) { baseRequest.get({ url: 'http://localhost:8080/jasperserver/rest/resource/reports/test/UserReports' }, function (e, r, body) { baseRequest.put({ url: 'http://localhost:8080/jasperserver/rest/report/reports/test/UserReports', body: '<resourceDescriptor></resourceDescriptor> ' }, function (e, r, body) { baseRequest.get({ url: 'http://localhost:8080/jasperserver/rest/report/58f342c1-a3a0-4df2-8855-6596deec9883?file=report' }, function (e, r, body) { console.log®; }); //console.log®; }); });}); //CODE Basically I have my report on Jasper Server and I'm trying to retrieve as a pdf through a Javascript file using node. Everything returns okay and fine except for my GET request at the end. It always returns a "report not found (uuid not found in session)" error, and I am unsure of how to get a uuid that stays constant. Note: The <resourceDescriptor> is there because the actual resourceDescriptor was simply too long and had very janky formatting.
×
×
  • Create New...