Hi
I have pentaho BI (mondrian) with catalog and cube. I can connect to it with Excel and this driver http://sourceforge.net/projects/xmlaconnect/. Xmlaconnect make POST request with Authorization header, filled with my username/password.
But authentication is not needed in sample code for kendo pivottable for SSAS cube:
Sample from telerik:
read: {
url: "http://demos.telerik.com/olap/msmdpump.dll", //define the URL of the service
dataType: "text",
contentType: "text/xml",
type: "POST" }
In my case authentication is needed. I try to implement it by such code:
My case:
var pivotgrid = $("#pivotgrid").kendoPivotGrid({
...
read: {
url: "http://192.168.15.54:8080/pentaho/Xmla",
dataType: 'text',
type: "POST",
beforeSend: function(req) {
req.setRequestHeader('Authorization', "Basic " + btoa("anonymous:anonymous"));
}
}
..but the result of this POST request is:
XMLHttpRequest cannot load http://192.168.15.54:8080/pentaho/Xmla. The request was redirected to
'http://192.168.15.54:8080/pentaho/Login;jsessionid=BF6E2FE9143B4402BCEEAAD115C714FA', which is disallowed for cross-origin requests that require preflight.
Xmlaconnect for Excel send POST filled with Authorization header and his data:
Authorization: Basic YW5vbnltb3VzOmFub255bW91cw==\r\n
. But sample for kendo pivot with kendoPivotGrid send OPRION request: my sniffer not catches POST packet in this case. Inside OPTION packet I see this:
Access-Control-Request-Headers: accept, authorization, content-type
It seems as authorization must be inside OPTION packet. But I am not see this header itself as for case of Xmlaconnect ...
What's the problem?