willemdankier Posted August 29, 2013 Share Posted August 29, 2013 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 installerHere 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=jasperadminI 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=1I 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.pdfNow 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 More sharing options...
willemdankier Posted September 1, 2013 Author Share Posted September 1, 2013 anyone has an idea? Link to comment Share on other sites More sharing options...
felipegdr Posted September 18, 2013 Share Posted September 18, 2013 The correct contexto used to run reports using rest_v2 is rest_v2/reportsSo your final URL should be something like: http://130.62.11.248:8080/jasperserver/rest_v2/reports/reports/Kassas.pdf Link to comment Share on other sites More sharing options...
mike2tango Posted November 16, 2013 Share Posted November 16, 2013 Hi. I hope you still use Jasper?Well, I did not try it since we do not need the server but what I can think of is that the v2 url is a separate webapp and therefore needs it's own login? Maybe you solve it by using all your url's in the v2 style. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now