Have you tried mx:RemoteObject?

Hiedra

De: Doug Simmons <doug777...@gmail.com>
Enviado el: domingo, 5 de junio de 2022 6:38
Para: users@royale.apache.org
Asunto: Royale RemoteObject with ColdFuaion

Hi,

Apache Royale Remote Object API says it is suitable for use with ColdFusion, 
but I can't get it to work.

In a Flex (AIR) project I have :

<s:RemoteObject id="roWeDates" destination="ColdFusion" 
source="charts.PCWEDates">
    <s:method name="getmonthdates" result="roWEDatesResultHandler(event)" 
fault="roFaultHandler(event)"/>
</s:RemoteObject>

this.roWeDates.getmonthdates(this.yearChooser.selectedItem, 
this.monthChooser.selectedIndex + 1);

and it all works perfectly.

Now I need to get this working in a browser.

So I have SDK Apache Royale 0.9.9 (JS only) (Bundled)

<js:RemoteObject id="roWEDates" destination="ColdFusion" 
result="roWEDateResultHandler(event)" fault="roFaultHandler(event)"
            
endPoint="http://localhost:8500/charts/PCWEDates.cfc";<http://localhost:8500/charts/PCWEDates.cfc>/>

this.roWEDates.send("getmonthdates", [this.yearChooser.selectedItem, 
this.monthChooser.selectedIndex + 1]);

This compiles correctly and then when you run it and send to the CF method : -

No data is returned from CF and neither result or fault handlers are triggered.

The browser log shows :

POSThttp://localhost:8500/popcharts/PCWEDates.cfc         [HTTP/1.1 302 Found 
972ms]

destination fault handler
Object { code: -1005, message: "Invalid response.", detail: "", data: null }    
            Language.js:280:22

I have tried with flex2gateway in the cfc url, but this causes a CORS preflight 
error.

Does anyone have a solution?

Doug

Reply via email to