Jump to content
We've recently updated our Privacy Statement, available here ×

Judes

Members
  • Posts

    3
  • 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

Everything posted by Judes

  1. Hi recenlty we have migrated to jasper V7.8. We try to create the JNDI connection to Oracle 18C from jasper, below is the context.xml, From your Jasper install location, apache-tomcatwebappsjasperserver-proMETA-INFcontext.xml <Context path="/jasperserver" reloadable="false" crossContext="true"> <Resource name="jdbc/jasperserver" auth="Container" type="javax.sql.DataSource" driverClassName="oracle.jdbc.OracleDriver" url="jdbc:oracle:thin:@10.101.90.12:1525:jasperserver" username="test" password="****" maxActive="300" maxIdle="10" validationQuery="SELECT 1" maxWait="100000" factory="com.jaspersoft.jasperserver.tomcat.jndi.JSCommonsBasicDataSourceFactory" /> <!-- Comment this line to enable session persistence across Tomcat restarts --> <Manager pathname="" /> </Context> While testing, the conection got failed and its generated the UUID: 1dc9fedb-4213-4a92-aa2d-be261fc4b613. Kindly help me to resolve this issue. Thanks
  2. I am trying to pass custom parameters to report with jasperreport server rest API. When I use reportsService like: http://localhost:8080/jasperserver/rest_v2/reports/my/MyReport.pdf?param1=val1 it works well. But when I trying to use reportExecutions Service it doesn't work and return 400 response code. For example with xml: POST http://localhost:8080/jasperserver/rest_v2/reportExecutions with body: <reportExecutionRequest> <reportUnitUri>/my/MyReport4</reportUnitUri> <outputFormat>pdf</outputFormat> <freshData>true</freshData> <saveDataSnapshot>false</saveDataSnapshot> <interactive>true</interactive> <allowInlineScripts>true</allowInlineScripts> <async>false</async> <parameters> <reportParameter name="param1"> <name> uuuuuuuuuuuuuuuuuu</name> </reportParameter> </parameters></reportExecutionRequest> Can anyone help me?
  3. Hi, Recently we have migrated the japser sever 5.2 to 7.8. Now we are changing the rest api call rest to rest_v2 and have changed the login and get report resource rest call based on the rest_v2. ClientConfig config = new ClientConfig(); BasicAuthSecurityHandler basic = new BasicAuthSecurityHandler(); basic.setUserName(jasperadmin); basic.setPassword(jasperadmin); config.handlers(basic); config.acceptHeaderAutoSet(true); 1. Rest Api : Login to Jasper Server Resource resource = client.resource("http://localhost:8080/jasperserver"+ "/rest_v2/login"); response = resource.contentType("application/x-www-form-urlencoded").accept("text/plain").post(loginStr); 2. Get report resource for the given report name resource = client.resource("http://localhost:8080/jasperserver" + "/rest_v2/resources/reports/" + "PM/test"); resource.header("Cookie", cookieString).header("Access-Control-Allow-Origin", "*"); resource.accept("application/xml"); response = resource.contentType("text/plain").get(); 3.Execute the report resource =client.resource("http://localhost:8080/jasperserver"+ "/rest/reports/reports/" + reportName + "?RUN_OUTPUT_FORMAT=" + format); resource.header("Cookie", cookieString); resource.accept("application/xml"); response = resource.contentType("text/xml").put(xmlToString(doc)); doc = parseXMLMessage(response.getEntity(String.class)); NodeList nList = doc.getDocumentElement().getElementsByTagName("uuid"); 4. Retrieve the report content String uuid = nList.item(0).getTextContent(); resource = client.resource("http://localhost:8080" + "/rest/report/" + uuid + "?file=report"); resource.header("Cookie", cookieString); response = resource.get(); we can able to run Step 1 and Step 2 successfully but step 3 while runing got 405 error. Step 3 - How to call the rest api and how to put the XML content to jasper server. Kindly assist me provide solution for how to implement the step 3 and step 4 using rest_v2 rest api call . Regards, Judes
×
×
  • Create New...