BusinessObjects Board

RESTful services and javascript help

So I am kinda of a newbie on this, so bear with me. I have have found some javascript code that I can use for login credentials to logon to our BI application (BI 4.2 SP 7). But even though the code appears to work. I have not been able to figure out how to extract the logon token so that I can use it with OpenDocument.

The strange part is the header for the response appears to be blank (the response is there). I do see a session in the CMC. Below is the code I am using. Any insight on this would be appreciated.

var invocation = new XMLHttpRequest();
var url = ‘http://host:8080/biprws/logon/long’;

var body = “<?xml version=\"1.0\"?><attrs xmlns=“”><attr name=“password” type=“string”>password<attr name=“clientType” type=“string”><attr name=“auth” type=“string” possibilities=“secEnterprise,secLDAP,secWinAD,secSAPR3”>secEnterprise<attr name=“userName” type=“string”>username”;
var xmlDoc = null;

var response;

var logonToken;“POST”,url);
invocation.setRequestHeader(“X-PINGARUNER”, “pingpong”);
invocation.setRequestHeader(“Content-Type”, “application/xml”);
invocation.setRequestHeader(“Accept”, “application/xml”);


invocation.onreadystatechange = function() {
	if (invocation.readyState == 4 &amp;&amp; invocation.status == 200) {
		console.log("Response Text " + invocation.response);
		console.log("Status " + invocation.status);

kevlray :us: (BOB member since 2010-06-23)

Never mind. My code to check to see if the header had been received was logically incorrect. Fixed now. I was ‘defining’ the same function twice, the second definition was overwriting the first one. Rookie mistake.

kevlray :us: (BOB member since 2010-06-23)