House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  Adobe Integrated Runtime (AIR)

Trouble with RemoteObject Flex vs AIR

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
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
Hi Craig,
Jayesh Viradiya
12/20/07 02:39 A
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Craig Verrastro
12/17/2007 04:36 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Thomas Woestman
12/17/2007 05:42 PM

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 -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jayesh Viradiya
12/18/2007 09:10 AM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Craig Verrastro
12/19/2007 10:18 AM

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 -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Jayesh Viradiya
12/20/2007 02:39 AM

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


<< Previous Thread Today's Threads Next Thread >>

Search adobe-integrated-runtime

May 19, 2013

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Designer, Developer and mobile workflow conference