jazzman Posted January 9, 2012 Share Posted January 9, 2012 I'm trying to run a report on jasper server 4.2.1 from java using rest webservice (HttpComponents) and I get: "Invalid resource descriptor" I've attached the code trying to do the put method to get the uuid. Is there something I'm ommiting? From Web Services guide - there's stuff about a "resource descriptor of type reportUnit" that must be included but I can't make sense of what that means. Does anyone know where I'm going wrong? Also is this the best way to run a pdf report from java using REST? Code: Post Edited by jazzman at 01/09/2012 20:16 Link to comment Share on other sites More sharing options...
waalp Posted January 10, 2012 Share Posted January 10, 2012 This is how i did it, mind you the code below is code for the play framework, so some methods like the WS.* methods are play framework specific.First I use the login method, to get a jsession if from the jasperserver. This jsessionid is in our case put in a global String, and added to the headers of all following requests.Then I run the runReport method with the URI to the report, and the outputformat I want. This returns an xml, wich I parse in the fetchReport method. This method finally downloads the report I requested.Hope this helps. Regards,Peter Code: Post Edited by waalp at 01/10/2012 11:07 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