通过JQuery.ajax()连接OLAP多维数据集 - XML / A. [英] Connecting OLAP Cube through JQuery.ajax() – XML/A

查看:219
本文介绍了通过JQuery.ajax()连接OLAP多维数据集 - XML / A.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为SSAS配置了HTTP访问(msmdpump.dll),以便在线访问OLAP Cube,如下面的博客所示。现在可以通过提供适当的连接字符串,通过远程连接使用msmdpump.dll访问多维数据集。
https://msdn.microsoft.com/en-us/library /gg492140.aspx

I have configured HTTP access (msmdpump.dll) for SSAS to access OLAP Cube online as provided in the below blog. And now cube can be accessed using msmdpump.dll through remote connection by providing appropriate connection string. https://msdn.microsoft.com/en-us/library/gg492140.aspx

同时,我试图通过JQuery.ajax()中的XML / A概念访问多维数据集,如下所示,

At same time, I have trying to access the cube through XML/A concept from JQuery.ajax () like below,

var MDX = " SELECT   {[Date].[Fiscal]  ON COLUMNS ,  {[Measures].[Customer Count]}  ON ROWS  FROM [Adventure Works] ;             
$.ajax({
            type: "POST",
            url: "http://localhost:6078/olap/msmdpump.dll",
            data: "<Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\"> <Header></Header> <Body> <Execute xmlns=\"urn:schemas-microsoft-com:xml-analysis\"> <Command> <Statement> " + MDX +" </Statement> </Command> <Properties> <PropertyList> <Catalog>Adventure Works DW Standard Edition</Catalog> </PropertyList> </Properties> </Execute> </Body> </Envelope>",
            success: function (responce, textStatus, jqXHR) {
                                                            $('body').append(responce);
            },
            contentType: "text/xml",
            dataType: "xml",
        });

但它抛出XMLHttpRequest无法加载 http:// localhost:6078 / olap / msmdpump.dll 。对于预检的响应具有无效的HTTP状态代码500异常,因为我们错过了为IIS配置交叉orgin-domain支持以访问OLAP数据。我通过提高以下论坛得到答案,

But it throws "XMLHttpRequest cannot load http://localhost:6078/olap/msmdpump.dll. Response for preflight has invalid HTTP status code 500" exception, since we have missed to configure cross orgin-domain support for IIS to access the OLAP data. And I have got answer by raising the following forum,

https://social.technet .microsoft.com /论坛/前列/ EN-US / 03e4f14e-3301-40b4-b00b-d81ca7b07ce7 / XMLHttpRequest的-不能负荷-httplocalhostolapmsmdpumpdll响应换预检具有-无效论坛= sqlanalysisservices&安培;教授=所需

在这里,我成功地向IIS提供了跨域域,以便对OLAP应用程序目录进行非身份验证访问(用于创建对msmdpump.dll的访问的节点)如下面的博客中所述。
http:// www .igniteui.com / help / igolapxmladatasource-configurations-iis-for-cross-domain-olap-data#summary

Here, I successfully provided the cross-orgin domain to the IIS for non-authenticate access for OLAP application directory (node for creating access to the msmdpump.dll) as mentioned in the below blog. http://www.igniteui.com/help/igolapxmladatasource-configuring-iis-for-cross-domain-olap-data#summary

最后我坚持以下异常,

XMLHttpRequest无法加载 http:// localhost :6078 / OLAP / msmdpump.dll 。请求标题字段在预检响应中,Access-Control-Allow-Headers不允许使用Content-Type。

"XMLHttpRequest cannot load http://localhost:6078/olap/msmdpump.dll. Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response."

请告诉我,

IIS是否还需要其他配置?

Is there anything additional configuration required for IIS ?

注意:此外,我还提供了对我的端口的网络访问(即连接字符串托管端口) )。

NOTE: Also, i have provided network access to my port (which is, connection string hosted port).

推荐答案

在IIS中托管我的示例后,问题解决了。当我尝试从file:/// C:/Users/prabus/Desktop/Sample/xmlaaccess.html本地路径时,我无法访问msmdpump.dll(它托管在同一台机器上)。因此,无法从本地文件路径访问localhost。

Problem is resolved for me after hosting my sample in IIS. While i am trying from "file:///C:/Users/prabus/Desktop/Sample/xmlaaccess.html" local path i can't able to access the msmdpump.dll(which is hosted in same machine). So, localhost is not accessible from local file path.

这篇关于通过JQuery.ajax()连接OLAP多维数据集 - XML / A.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆