私はこれにかなりの時間を費やしたので、ここで立ち往生しています。
デバッグ プレーヤー 10.1 を使用して、次の XMLA 要求を取得しています。
http://localhost/dir/blah.swf
に:
http://localhost/olapbin/msblah.dll
これはファイルシステムでは正常に機能しましたが、現在は IIS7 Web サーバー上にあります。
crossdomain.xml ファイルをいろいろいじった後、次のように決めました。
<?xml version="1.0"?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="master-only"/>
<allow-access-from domain="*" to-ports="*" />
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>
次の場所に配置されます。
http://localhost/crossdomain.xml
そして読む:
Security.loadPolicyFile("http://localhost:80/crossdomain.xml");
私はポリシーファイルのログを設定し(上記のファイルを作成するのに役立ちました)、IE8ではすべて正常に機能しています。私は得る:
OK: Root-level SWF loaded: http://127.0.0.1/akts/ThinSlicerRunner.swf
OK: Policy file accepted: http://localhost/crossdomain.xml
OK: Searching for <allow-access-from> in policy files to authorize data loading from resource at http://localhost/olapbin/msmdpump.dll by requestor from http://127.0.0.1/akts/ThinSlicerRunner.swf
OK: Searching for <allow-http-request-headers-from> in policy files to authorize header sending to URL http://localhost/olapbin/msmdpump.dll by requestor from http://127.0.0.1/akts/ThinSlicerRunner.swf
OK: Request for resource at http://localhost/olapbin/msmdpump.dll by requestor from http://127.0.0.1/akts/ThinSlicerRunner.swf is permitted due to policy file at http://localhost/crossdomain.xml
Chrome と Firefox では、次のようになります。
OK: Root-level SWF loaded: http://localhost/akts/ThinSlicerRunner.swf
OK: Policy file accepted: http://localhost/crossdomain.xml
他には何もありません... httpserviceリクエストを承認する試みはありません。
メインのフレックス エラー ログには次のように表示されます。
*** Security Sandbox Violation ***
Connection to
http://localhost/olapbin/msmdpump.dll
halted - not permitted from http://localhost/akts/ThinSlicerRunner.swf
IE8から同じことを実行すると表示されません。何が起こっているのかわかりますか??
要求に応じて... その他のコード
主な送信要求:
var connection:TsConnection = this.__connection;
var token:AsyncToken = new AsyncToken(null);
connection.service.request = this.__curSoapRequest;
var actualToken:AsyncToken = connection.service.send();
__tokenArr.push(actualToken);
var responder:AsyncResponder = new AsyncResponder(resultHandler, faultHandler, actualToken);
__responderArr.push(responder);
actualToken.addResponder(responder);
接続オブジェクトのハイライト:
public function init():void {
//Initialize the service object needed to query the server
this.__service = new HTTPService;
this.__service.method = "POST";
this.__service.contentType = "application/xml";
this.__service.resultFormat = "e4x";
this.__service.headers = getHeaders();
this.__service.url = this.__model.xmlaUrl;
this.__initialized = true;
}
public function get service():HTTPService {
return this.__service;
}
private function getHeaders():Object {
var o:Object = {};
o["SOAPAction"] = '"urn:schemas-microsoft-com:xml-analysis:Discover"';
o["Content-Type"] = "text/xml";
return o;
}
ご協力いただきありがとうございます...これが修正されたときに他の人に役立つことを願っています. ;-)