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

sjayanti89

Members
  • Posts

    2
  • 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 sjayanti89

  1. Hi, May i know, why you want to do authentication via POST. Anyway, use URL as "http://localhost:8080/jasperserver-pro/j_spring_security_check?"+ "j_username=" + username+ "&j_password=" + password; Remove the line "con.setRequestProperty("Authorization", jasperAuth);" as you are passing credentials in the URL. Then, your code for connection object with POST should work. check the response code. If 200, build session id as below: String session_id = con.toString() + ""; int index1 = session_id.indexOf("="); int index2 = session_id.indexOf("?"); jsessionId = session_id.substring(index1 + 1, index2); return jsessionId; pass this session ID for the next request by setting request property as below for new connection object for GET method url = new URL(urlGET); HttpURLConnection getConnection = (HttpURLConnection) urlGET.openConnection(); getConnection .setRequestProperty("Cookie", "JSESSIONID=" + session_id); make sure to set Content-Type, Accept and request method as "GET" for getConnection object. Hope it helps.
  2. Hi All, I have a rest service running on oAUTH 2.0 Report configured using JSON URL as datasource. I was able to trigger the service, and generate reports when i disable oAUTH authentication. Can somebody explain how to 1. enable oAUTH 2.0 on Server 7.8.0 2. call rest service from jasper report, when oAUTH is enabled on rest service Thanks
×
×
  • Create New...