Re: Royale RemoteObject with ColdFuaion

2022-06-06 Thread Doug Simmons

Hi All,

Many thanks for all the suggestions. I will give them a try.

Surely though, the best solution is to get Royale RemoteObject working 
properly, unless anyone is aware of some fundamental reason why it 
can't. I'm happy to take a look at any relevant source code to see if I 
can devise a fix at least for CF. It wouldn't be quick as I will shortly 
be away for nearly two months. But if there is no time constraint, I'm 
happy to try.


Doug



On 07/06/2022 05:18, Alina Kazi wrote:

Hi Doug,

I have used mx:RemoteObject in several applications.
Remote Object in declaration block of mxml file
endpoint="{ROEndpoint}" showBusyCursor="true" source="{ROSource}">

Responder and fault handlers I have added using AsyncTolen and Responder.

var responder680:Responder = new 
Responder(on_sel_ScanDocTypeCd_SimpleRH, ROFaultHandler);
 var token680:AsyncToken = 
EPSObj.sel_ScanDocTypeCd_Simple((FlexGlobals.topLevelApplication as 
IEPS).getAppUserInfo(true)); token680.addResponder(responder680); 
trace(token680);



In some cases I have created the RemoteObject in actionscript class 
too and it works fine.

In the above case the Result handler is: on_sel_ScanDocTypeCd_SimpleRH
And fault handler is :
ROFaultHandler

Hope that helps.

-Alina Kazi

On Tue, 7 Jun 2022, 2:02 am Maria Jose Esteve,  wrote:

Have you tried mx:RemoteObject?

Hiedra

*De:* Doug Simmons 
*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 :


    


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)

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



Re: reading bytearray from php into actionscript

2022-06-06 Thread Greg Dove
I don't really understand what you mean by :  "PHP won't print it after I
return AMF3 encoded binary."

However on the client (Royale) side, the toString method is the same as
reading UTF encoded string from the BinaryData instance. The current
version of mx.utils.ByteArray is not 'really' any different from
org.apache.royale.utils.BinaryData for javascript.

If you are expecting AMF3 encoded content then you probably want to decode
it (using readObject()) with an
org.apache.royale.net.remoting.amf.AMFBinaryData instance.

Also, iirc org.apache.royale.net.URLLoader assumes the data result is text.
You probably want a URLBinaryLoader instance instead I think, which would
give you a org.apache.royale.utils.BinaryData instance from its data getter
in the complete handler. if you are then expecting AMF3 content, then
probably you could do something similar to what you are doing with
'ByteArray' but substituting AMFBinaryData instead, but you would not be
using toString() in that case, you would more likely use readObject(). I am
not sure about the endian-ness setting.





On Mon, Jun 6, 2022 at 11:03 PM Yishay Weiss  wrote:

> Is length being updated correctly?
>
>
>
> *From: *Jim McNamara 
> *Sent: *Monday, June 6, 2022 5:55 AM
> *To: *users@royale.apache.org
> *Subject: *reading bytearray from php into actionscript
>
>
>
> Hi all-
>
> I searched the internet for this.
>
> I can't seem to get a string representation of the binary data passed back
> from php_amf3.
>
> Please glance at the code and let me know if you have a tip.
>
> thanks for any tips!
> jim
>
>
> 
>
>
>
> 

Re: Royale RemoteObject with ColdFuaion

2022-06-06 Thread Alina Kazi
Hi Doug,

I have used mx:RemoteObject in several applications.
Remote Object in declaration block of mxml file

Responder and fault handlers I have added using AsyncTolen and Responder.

var responder680:Responder = new Responder(on_sel_ScanDocTypeCd_SimpleRH,
ROFaultHandler);
 var token680:AsyncToken =
EPSObj.sel_ScanDocTypeCd_Simple((FlexGlobals.topLevelApplication as
IEPS).getAppUserInfo(true)); token680.addResponder(responder680);
trace(token680);


In some cases I have created the RemoteObject in actionscript class too and
it works fine.
In the above case the Result handler is: on_sel_ScanDocTypeCd_SimpleRH
And fault handler is :
ROFaultHandler

Hope that helps.

-Alina Kazi

On Tue, 7 Jun 2022, 2:02 am Maria Jose Esteve,  wrote:

> Have you tried mx:RemoteObject?
>
>
>
> Hiedra
>
>
>
> *De:* Doug Simmons 
> *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 :
>
>  source="charts.PCWEDates">
>  fault="roFaultHandler(event)"/>
> 
>
> 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)
>
>  result="roWEDateResultHandler(event)" fault="roFaultHandler(event)"
> endPoint="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
>


RE: Royale RemoteObject with ColdFuaion

2022-06-06 Thread Maria Jose Esteve
Have you tried mx:RemoteObject?

Hiedra

De: Doug Simmons 
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 :





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)

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


Re: Royale RemoteObject with ColdFuaion

2022-06-06 Thread GAbe Barbosa
One thing you can try is add the result and fault handlers programmatically
instead of in mxml. At least with mx:RemoteObject there is some mxml
parsing error that doesn't attach the handlers.

On Sat, Jun 4, 2022 at 9:37 PM Doug Simmons  wrote:

> 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 :
>
>  source="charts.PCWEDates">
>  fault="roFaultHandler(event)"/>
> 
>
> 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)
>
>  result="roWEDateResultHandler(event)" fault="roFaultHandler(event)"
> endPoint="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
>
> 
>


RE: reading bytearray from php into actionscript

2022-06-06 Thread Yishay Weiss
Is length being updated correctly?

From: Jim McNamara
Sent: Monday, June 6, 2022 5:55 AM
To: users@royale.apache.org
Subject: reading bytearray from php into actionscript

Hi all-

I searched the internet for this.

I can't seem to get a string representation of the binary data passed back from 
php_amf3.

Please glance at the code and let me know if you have a tip.

thanks for any tips!
jim