You will need either a crossdomain.xml file on
"'http://hasanmaqbool:8080/
<http://hasanmaqbool:8080/pentaho/ServiceAction'+serverURL+'action=MyOwn
Data.xaction'> ", or you will need to proxy the data call through a
server.  Without a crossdomain policy file, the Flash Player is not
allowed to acces data from a domain different than the one that served
the swf.  Search anywhere for full details.

 

Tracy

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Hasan Maqbool
Sent: Wednesday, March 12, 2008 3:46 AM
To: [email protected]
Subject: [flexcoders] Error accessing URL problem

 

Hey Techies,
I am working with an open BI Suite which is known as Pentaho and I am
designing the front end with Flex 3.0. Now, the problem is, I am using
action sequences in pentaho to get the data from the source system. This
data is exposed as an XML Soad Message through a URL. So, my code in
flex is as follows

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml
<http://www.adobe.com/2006/mxml> " creationComplete="xactionSVC.send()"
layout="absolute" xmlns:ilog="http://www.ilog.com/2007/ilog/flex
<http://www.ilog.com/2007/ilog/flex> ">

<mx:HTTPService 
    id="xactionSVC"  
 
url="{'http://hasanmaqbool:8080/pentaho/ServiceAction'+serverURL+'action
=MyOwnData.xaction'
<http://hasanmaqbool:8080/pentaho/ServiceAction'+serverURL+'action=MyOwn
Data.xaction'> }" 
    result="formatData(event)" 
    fault="FaultHandler(event)" showBusyCursor="true"
    />
    <!-- CONTROLLER -->
    <mx:Script><![CDATA[
    
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import mx.controls.Alert
     import mx.collections.ArrayCollection;
     private var queryResult:XML;
     [Bindable]private var serverURL:String="?&solution=&path=&";
     [Bindable] private var userActions:ArrayCollection;
     
     private function formatData(event:ResultEvent):void
     {
         
         userActions = new ArrayCollection();
         //UserEventsPieChart.dataProvider = userActions;
         var hdr:ArrayCollection =
event.result.Envelope.Body.ExecuteActivityResponse.qresult['COLUMN-HDR-R
OW']['COLUMN-HDR-ITEM'];
         for each (var pl:Object in
event.result.Envelope.Body.ExecuteActivityResponse.qresult['DATA-ROW'])
         {
             var spl:Object = new Object();
             spl[hdr[0]] = pl['DATA-ITEM'][0];
             spl[hdr[1]] = pl['DATA-ITEM'][1];
             userActions.addItem(spl);
         }
     }
private function FaultHandler(event:FaultEvent):void
     {
                Alert.show(event.fault.message, "Error");
                
     }
]]></mx:Script>

But i am getting the following problem.

faultCode:Channel.Security.Error faultString:'Security error accessing
url' faultDetail:'Destination: DefaultHTTP'

Can anyone tell me how to get out of this?

-- 
Muhammad Hasan Maqbool
Software Engineer
Techlogix Pakistan (Pvt) Limited
+92-321-6690881 

 

Reply via email to