Hi all,
When making a login request via REST I am getting back a 200 OK response like this:
HTTP/1.1 200 OK Date: Thu, 14 Mar 2013 18:50:11 GMT Content-Length: 0 P3P: CP="ALL" Content-Type: text/xml;charset=UTF-8 Server: Apache-Coyote/1.1 </pre>
but - without a session id...
Oddly - if I am ALREADY logged into jasperserver, it DOES return a session ID like so;
HTTP/1.1 200 OK Date: Thu, 14 Mar 2013 18:47:21 GMT Content-Length: 0 P3P: CP="ALL" Set-Cookie: JSESSIONID=4278973A7101ECC11A9504EF2107BF4E; Path=/jasperserver Content-Type: text/xml;charset=UTF-8 Server: Apache-Coyote/1.1
Which appears to be giving my my current session Id, ok great, but the login is NOT working ?Doesn't make any darn sense...
Here is the code I am using (as well as testing the POST using RestClient tool):
function fRESTLogin() { uri_address = "http://{server-address}:8080/jasperserver/rest/login"; var xmlhttp = new XMLHttpRequest(); xmlhttp.open("POST",uri_address,true); xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded"); xmlhttp.send("j_username=jasperadmin&j_password=jasperadmin"); }
Can anyone see what I am doing wrong or incorrectly ?
I couldn't see in the API documentation where I am missing anything in my request....
Of course, I am not using jasperadmin/jasperadmin normally - but have tried it in testing this as shown here
We are running JasperReports Server CE 4.7 on Tomcat 6
add comment