Connecting OLAP Cube through JQuery.ajax() – XML/A
<p>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.
<a href="https://msdn.microsoft.com/en-us/library/gg492140.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/gg492140.aspx</a></p>

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

<pre><code>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: "&lt;Envelope xmlns=\"http://schemas.xmlsoap.org/soap/envelope/\"&gt; &lt;Header&gt;&lt;/Header&gt; &lt;Body&gt; &lt;Execute xmlns=\"urn:schemas-microsoft-com:xml-analysis\"&gt; &lt;Command&gt; &lt;Statement&gt; " + MDX +" &lt;/Statement&gt; &lt;/Command&gt; &lt;Properties&gt; &lt;PropertyList&gt; &lt;Catalog&gt;Adventure Works DW Standard Edition&lt;/Catalog&gt; &lt;/PropertyList&gt; &lt;/Properties&gt; &lt;/Execute&gt; &lt;/Body&gt; &lt;/Envelope&gt;",
            success: function (responce, textStatus, jqXHR) {
                                                            $('body').append(responce);
            },
            contentType: "text/xml",
            dataType: "xml",
        });
</code></pre>

<p>But it throws “XMLHttpRequest cannot load <a href="http://localhost:6078/olap/msmdpump.dll" rel="nofollow">http://localhost:6078/olap/msmdpump.dll</a>. 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, </p>

<p><a href="https://social.technet.microsoft.com/Forums/forefront/en-US/03e4f14e-3301-40b4-b00b-d81ca7b07ce7/xmlhttprequest-cannot-load-httplocalhostolapmsmdpumpdll-response-for-preflight-has-invalid?forum=sqlanalysisservices&amp;prof=required" rel="nofollow">https://social.technet.microsoft.com/Forums/forefront/en-US/03e4f14e-3301-40b4-b00b-d81ca7b07ce7/xmlhttprequest-cannot-load-httplocalhostolapmsmdpumpdll-response-for-preflight-has-invalid?forum=sqlanalysisservices&amp;prof=required</a></p>

<p>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.
<a href="http://www.igniteui.com/help/igolapxmladatasource-configuring-iis-for-cross-domain-olap-data#summary" rel="nofollow">http://www.igniteui.com/help/igolapxmladatasource-configuring-iis-for-cross-domain-olap-data#summary</a></p>

<p>Finally I have stuck with following exception,</p>

<p>“XMLHttpRequest cannot load <a href="http://localhost:6078/olap/msmdpump.dll" rel="nofollow">http://localhost:6078/olap/msmdpump.dll</a>. Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.”</p>

<p>Please advise me,</p>

<p>Is there anything additional configuration required for IIS ?</p>

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