Jump to content

Can not run a report using rest v2


willemdankier

Recommended Posts

Hi all,

I'm busy getting my software to talk to the webservice of JasperServer. I would like to run a simple report, but it does not work, and I tried a lot!

Using the default user/password on a test install of JasperServer 5.2 (Cummunity Edition) on a Windows 2008 Server using the default setting of a 64 bit Windows installer

Here is wat I do:

1. I log in with a GET request on http://130.62.11.248:8080/jasperserver/rest/login?j_username=jasperadmin&j_password=jasperadmin
I got a 200 result with a cookie in the headers and I remember that for future use.

2. I ask for a list of reports with a GET request (with the previously received cookie in the headers) on http://130.62.11.248:8080/jasperserver/rest/resources/reports?type=reportUnit&recursive=1
I got a 200 result with a wonderfull xml in the body, containing a list of resourceDescriptors with reports. I fill a list with the name, label, description and uriString, so I can select one to run.

3. I select a very simple report. This reports contains only 3 fields. No parameters, vars, images or anything like that. When I log in to JasperServer with my browser (with the same credentials), the reports runs fine. Its one page which contains about 20 records. according to the previously received xml, the uriString of this report is /reports/Kassas.

4. The easiest way to get a pdf of that report using the webservice should be a rest_v2 call. So I do a GET request (with the cookie set in the headers) on http://130.62.11.248:8080/jasperserver/rest_v2/report/reports/Kassas.pdf

Now I get a 404 Not Found reponse. And that is where I need some help.

I played with the extension (for format selection), an alternative resource path, which gave me a 'resource not found' error.
The user has an admin role.

I am out of options. Please tell me what I do wrong. I got two days left before my manager wants to decide if we continue with JasperServer.

Thank you for your valuable time!

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

  • 3 weeks later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...