torinfo
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forum
Events
Featured Visualizations
Knowledge Base
Documentation (PDF Downloads)
Blog
Documentation (Test Area)
Documentation
Dr. Jaspersoft Webinar Series
Downloads
Posts posted by torinfo
-
-
You need to modify the resource first using the rest/resource service, and run the report.
-
I'll answer my own question:
The PUT request to run a query returns a session cookie, and you have to use that cookie in the subsequent GET call with the uuid:
Code: // Send PUT, the requestAllResult contains the above <report>...string requestAllResult = httpclient.UploadString("http://website/jasperserver/rest/report/Declaraties/12change/Klant/budget_overzicht_per_klant?RUN_OUTPUT_FORMAT=PDF", "PUT", requestXml);// Extract uuid, and fileSystem.Xml.XmlDocument doc = new System.Xml.XmlDocument();doc.LoadXml(requestAllResult);XmlNode node = doc.DocumentElement.SelectSingleNode("uuid");string uuid = node.InnerText;// Get Session from ResponeHeadersstring session = httpclient.ResponseHeaders.Get("Set-Cookie");httpclient.Headers.Add("Cookie", session);//Build GET URLstring reportUrl = "http://website/jasperserver/rest/report/";reportUrl += uuid;reportUrl += "?file=report";// Get reportstring report;report = httpclient.DownloadString(reportUrl);
-
Like more people on the list I can't get the rest api workin, and I am ALMOST there... sigh
My issue is that I succeed in doing the PUT request to generate the report and the answer I get looks ok too! (4 pages 1 file, PDF)
Howver, I can't get the report itself. If I do a get http://<website>/jasperserver/rest/report/<uuid received from put>?file=report;
I get a HTTP 404 error.
The only thing that is different from the sample and documentation is that the identifier of the report is in CDATA
I use asp.net C#, the WebClient class with basic Authentication.
Code: The resul of the PUT
Post Edited by torinfo at 03/07/2012 21:45Code: The basic flow to run the report
Post Edited by torinfo at 03/07/2012 21:53
Post Edited by torinfo at 03/07/2012 21:54 -
L.S.,
I added a Web reference to my asp.net application to generate a c# proxy class to the UserAndRoleManagementService webservice. When coding Intellisense nicely shows me all the methods and members.
However, it genreates an error when I compile. 'Cannot reflect findUsers". I then created the proxy class using the wsdl utility, and when instantiating the webservice class, an exception is thrown with basically the same error.
After some searching on the internet on the meaning of this, I know that exception is raised because the type of WSUser.previousPasswordChangeTime is xsd:date, which is illegal, beciase date is not a simple type.
Is there any way around this??
Regards,
Tom
Where JDBC data source information stored in JasperReport server 4.5
in Products
Posted
Is that a question? You could also use webservices to change a datasource.
Post Edited by torinfo at 03/10/2012 08:30