|
Mailing Lists
|
Home /
Groups /
Adobe Integrated Runtime (AIR)
Trouble with RemoteObject Flex vs AIR
Hello,Craig Verrastro 12/17/07 04:36 P Hi Craig,Thomas Woestman 12/17/07 05:42 P Hi Craig,Jayesh Viradiya 12/18/07 09:10 A I have tried both remedies that have been suggested. First, I created a crossdomain.xml file with the following xml inside it. I placed it in my localhost root directory C:\CFusionMX7\wwwroot\Craig Verrastro 12/19/07 10:18 A Hi Craig,Jayesh Viradiya 12/20/07 02:39 A Hello, I have an application that I originally built in Flex2. It uses a RemoteObject to call a CFC which returns xml. Everything works perfectly. But when i try to run the application as an AIR app, the RemoteObject returns null instead of an xml packet. I changed the endpoint of the RemoteObject to "http://localhost/flex2gateway/" and I'm fairly confident that I am reaching the CFC fine, but I can't seem to get any data back when I'm using AIR. Thanks in advance Hi Craig, Did you grant access to Flex/Flash applications on your CF server using the crossdomain.xml file? I expect this may be causing the access difficulty. Check out the following URL for details: www.adobe.com/go/14213 Tom On Dec 17, 2007 1:24 PM, Craig Verrastro <noneater@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more ----- Hi Craig, For the <mx:RemoteObject> tag with AIR, you need to explicitly specify the endpoint url "http://localhost/flex2gateway/" inside the tag. Are you trying it the same way ? works fine for me. Jayesh Viradiya Hello, I have an application that I originally built in Flex2. It uses a RemoteObject to call a CFC which returns xml. Everything works perfectly. But when i try to run the application as an AIR app, the RemoteObject returns null instead of an xml packet. I changed the endpoint of the RemoteObject to "http://localhost/flex2gateway/" and I'm fairly confident that I am reaching the CFC fine, but I can't seem to get any data back when I'm using AIR. Thanks in advance I have tried both remedies that have been suggested. First, I created a crossdomain.xml file with the following xml inside it. I placed it in my localhost root directory C:\CFusionMX7\wwwroot\ <?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="*" secure="false" /> </cross-domain-policy> That didn't seem to help. Unless I am doing something wrong with it. Then, I checked my <mx:RemoteObject> tag. Here is my code for it: <mx:RemoteObject endpoint="http://localhost/flex2gateway/" id="controllerCFC" destination="ColdFusion" source="watt.apps.dynCatAdminAir.controllers.Controller" showBusyCursor="true"> <mx:method name="getKeyFeaturesXML" result="getKeyFeaturesXMLResultHandler( event )" fault="Alert.show(event.fault.message)" /> </mx:RemoteObject> Then I'm calling it with : controllerCFC.getKeyFeaturesXML.send(); Again, everything works fine in Flex, and all code is exactly the same, minus the "endpoint="http://localhost/flex2gateway/" in my <mx:RemoteObject> tag. In Flex, I did not specify any endpoint at all. Thanks again for any help that you can offer. ----- Excess quoted text cut - see Original Post for more ----- Hi Craig, I am doing AIR with CF8 and it works fine. Could you just check on the following points and see if it helps? 1> http://localhost/flex2gateway/ - when you access this URL in Browser, you should get a blank page without any error message. If you don't get it that way, then there is something wrong 2> Also, could you try it by enabling(if already not) "Data & Services > Flex integration > Enable Flash Remoting support"? BTW, when you launch your AIR app, what error message do you receive ? could you post the stack strace. Jayesh Viradiya I have tried both remedies that have been suggested. First, I created a crossdomain.xml file with the following xml inside it. I placed it in my localhost root directory C:\CFusionMX7\wwwroot\ <?xml version="1.0"?> <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> <cross-domain-policy> <allow-access-from domain="*" secure="false" /> </cross-domain-policy> That didn't seem to help. Unless I am doing something wrong with it. Then, I checked my <mx:RemoteObject> tag. Here is my code for it: <mx:RemoteObject endpoint="http://localhost/flex2gateway/" id="controllerCFC" destination="ColdFusion" source="watt.apps.dynCatAdminAir.controllers.Controller" showBusyCursor="true"> <mx:method name="getKeyFeaturesXML" result="getKeyFeaturesXMLResultHandler( event )" fault="Alert.show(event.fault.message)" /> </mx:RemoteObject> Then I'm calling it with : controllerCFC.getKeyFeaturesXML.send(); Again, everything works fine in Flex, and all code is exactly the same, minus the "endpoint="http://localhost/flex2gateway/" in my <mx:RemoteObject> tag. In Flex, I did not specify any endpoint at all. Thanks again for any help that you can offer. ----- Excess quoted text cut - see Original Post for more ----- I'm >fairly confident that I am reaching the CFC fine, but I can't seem to >get any data back when I'm using AIR. > >Thanks in advance
|
May 19, 2013
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||