glenmiller Posted December 6, 2014 Share Posted December 6, 2014 I can get the JSON Data Adapter to query a REST service by setting File / URL: in the Jasper Studio Data Adapter wizard to something like "http://127.0.0.1:8080/testrestservice". But how do you append user provided parameters to the base url so that the url used to acutally retrieve the data would be something like "http://127.0.0.1:8080/testrestservice?name=Jack". Link to comment Share on other sites More sharing options...
ernestoo Posted December 8, 2014 Share Posted December 8, 2014 Hi there, sorry I don't have much time to explain but looking at this example should help you with a solution (Note that I couldn't get it to preview properly on JSS, only the server) Link to comment Share on other sites More sharing options...
glenmiller Posted December 8, 2014 Author Share Posted December 8, 2014 Thanks for the example. I am new to Jasper and can't quite figure it all out. I think I am missing some config settings. The first difference in my tests and you file is I have a that gets inserted by studio. I have added the follwing "12" "http://127.0.0.1:8080/candidatemanager/app/rws/misc/test7?locationId=" +$P{locationId} To use my rest service, based on what I could see from your example. But it does not seem to be overriding the file / url from the default data adapter being inserted by studio. Everytime I use preview it uses the values set in JSON file Adapter file / url text box. How do I get the url set in the parameter element above to be used instead? Link to comment Share on other sites More sharing options...
ernestoo Posted December 9, 2014 Share Posted December 9, 2014 Hi Glen, the thing is that when you set the net.sf.jasperreports.json.source "by hand" you should not use the JSON data adapter (because it will effectively over-write it)...you should use --No Data Adapter -- I don't know how to select it but if you don't select one at all it will use no data adapter...I'm on JSS 6.0 btw 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