![]() |
![]() |
||||||
|
|||||||
| Tags: fault, rpc, string |
![]() |
|
|||
|
Hi, Guys:
I am completely new to Flex, and I started using the HTTPService to extract information using the trial version until I started using the non-trial version one. When I run the program, it now gives me this: [RPC Fault faultString="Security error accessing url" faultCode="Channel.Security.Error" faultDetail="Destination: DefaultHTTP"] at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/ flex/mx/internal::faultHandler ()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Ab stractInvoker.as:216] at mx.rpc::Responder/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\Re spon der.as:49] at mx.rpc::AsyncRequest/fault()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\As y ncRequest.as:103] at DirectHTTPMessageResponder/securityErrorHandler()[E:\dev\3.0.x\frameworks\projec ts\rpc\src\mx\messaging\channels\DirectHTTPChannel .as:368] at flash.events::EventDispatcher/dispatchEventFunctio n() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/redirectEvent() I have installed my Flex on my C drive, and therefore I am a little confused with the message here. Does anyone know how I can fix this? Alice <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="rssRequest.send()"> <mx:Script><![CDATA[ private function lfnGeneral(item:Object, column ataGridColumn):String{ var sLabel:String = "" var sHeaderText:String = column.headerText; //so we can handle the specific column we are working with switch (sHeaderText) { case "OIS ID": sLabel = item.ois_id; break; case "Name": sLabel = item.name; break; case "Physician First Name": sLabel = item.physician_name.first_name; break; case "Physician Last Name": sLabel = item.physician_name.last_name; break; } return sLabel; }//lfGeneral ]]></mx:Script> <mx:HTTPService id="rssRequest" url="http://www.test.com/test/test_flex.php"/> <!--<mx:Tile id="myFlow" direction="horizontal" borderStyle="solid" paddingTop="10" paddingBottom="10" paddingRight="10" paddingLeft="10" verticalGap="15" horizontalGap="10">--> <mx:Panel id="panel" title="student Information" status="Active" paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"> <mx:Form id="studentinfo" width="600"> <mx:FormHeading label="student nformation"/> <mx:FormItem label="student ID"> <mx:TextInput id="ois_id" width="100%"/> </mx:FormItem> <mx:FormItem label="student Name"> <mx:TextInput id="pname" width="100%"/> </mx:FormItem> <mx:FormItem label="Gender" direction="horizontal"> <mx:RadioButton groupName="gendertype" id="male" label="Male"/> <mx:RadioButton groupName="gendertype" id="female" label="Female"/> </mx:FormItem> <mx:FormItem label="Age"> <mx:TextInput id="age"/> </mx:FormItem> <mx:FormItem> <mx:Button label="Submit" labelPlacement="right" enabled="true"/> </mx:FormItem> </mx:Form> <mx:VBox width="500"> <mx ataGrid id="student_info" width="100%"dataProvider="{rssRequest.lastResult.students.stud ent}"> <mx:columns> <mx ataGridColumn headerText="OIS ID" /><mx ataGridColumn headerText="Name" /><mx ataGridColumn headerText="Physician FName" /><mx ataGridColumn headerText="Physician LName" /></mx:columns> </mx ataGrid></mx:VBox> <mx:LinkButton label="Go to BeamData File" click="navigateToURL(new URLRequest('http://www.test.com/TPU/students/10/be amdata/BeamGeometry.dat'));"/> </mx:Panel> <!--</mx:Tile>--> </mx:Application> |
| Sponsored Links |
|
|||
|
If you run the app from under Flex builder, you shouldn't get this error. Are
you? Or are you running it from a web server? If from a web server, (and sooner or later you will be) then you nee a crossdomain.xml file on the server serving the data: http://www.test.com/crossdomain.xml See the docs, the archive and google for details on the crossdomain.xml file. Tracy |
|
|||
|
Hi,
Thanks for replying. Yes, I am not running this on the web server, and it turns out that the RPC appeared because I was importing extra controls that I don't need. I will definitely check out this article. Thanks for the tip. Alice |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise