FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread doug777
Hi All, Moonshine now working properly. The folks at Moonshine were fantastic, instant response and quickly solved my problem. The complete code for the project is at https://justpaste.it/1bgfa The important bit is here private function init():void{ this.roSTime.send("getUTCDateTimeN

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread Alex Harui
Hi Doug, 1004 appears to be when XHR returns something unexpected like status == 0 or responseType == "text". I think you need to set the RemoteObject endpoint to the be URL to hit. The RemoteObject source is passed as part of the message packet to the server and is not parsed to find the URL for

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread doug777
Hi Alex, New error Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost:8500/booxotel/STime. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). (unknown) destination fault handler Object { code: -1004, message: "Invalid response

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread Alex Harui
Hi Doug, What browser are you using? And what is the URL for the app in the browser? Is it file:// or https:// or http://? IIRC, some browsers may be more picky about file:// accessing http://localhost. -Alex On 9/19/17, 8:41 PM, "doug777" wrote: >Hi Alex, > >New error > >Cross-Origin Reque

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread doug777
OK fixed the browser issue. Now http://localhost:8500/booxotel/STime.cfc"; result="roCheckTestResultHandler(event)" fault="roFaultHandler(event)"/> result destination fault handler Object { code: -1005, message: "Invalid response.", detail: "", data: null } Language.js:238:7 Doug -- Sent

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread Alex Harui
Hi Doug, Looks like we could use better error reporting in that code. Please try setting a breakpoint in AMFNetConnection.js where it sees that readyState === 4 and see what the xhr.status is. It appears that you are not getting a 200 status code. I don't think this code currently handles redir

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread doug777
xhr.status is 200. -- Sent from: http://apache-flex-users.246.n4.nabble.com/

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread Alex Harui
OK, that's good to know. That code also checks: xhr.responseType == "arraybuffer" and xhr.getResponseHeader("Content-type").indexOf("application/x-amf") > -1) What are you getting for those values? -Alex On 9/19/17, 9:37 PM, "doug777" wrote: >xhr.status is 200. > > > >-- >Sent from

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread doug777
-- Sent from: http://apache-flex-users.246.n4.nabble.com/

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread Alex Harui
Hi Doug, So it looks like responseType is correctly "arrayBuffer", but I can't see how to determine from your link what the result for xhr.getResponseType("Content-type") was. It must be something other than "application/x-amf" -Alex On 9/19/17, 9:51 PM, "doug777" wrote: >

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-19 Thread doug777
I can't find xhr.getResponseType - any clue as to where it will be shown? -- Sent from: http://apache-flex-users.246.n4.nabble.com/

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread Alex Harui
It is a function, not a property. I think in the console when you are stopped in the debugger, you can type: xhr.getResponseHeader("Content-type") And it should spit out what we want to see. HTH, -Alex On 9/19/17, 10:36 PM, "doug777" wrote: >I can't find xhr.getResponseType - any clue as

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread Harbs
In the console while you are paused where you show, run this: xhr.getResponseType("Content-type”) Harbs > On Sep 20, 2017, at 8:36 AM, doug777 wrote: > > I can't find xhr.getResponseType - any clue as to where it will be shown? > > > > -- > Sent from: http://apache-flex-users.246.n4.nabb

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread doug777
Can't find any way to do this in Firefox, though I did find this in StackOverflow Currently there is no way to show the values of getters within the Firefox DevTools, but it is already filed as bug 820878. Tried to use Chrome, but this cannot load from localhost because no Access-Control-Allow-Or

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread Harbs
FWIW, Chrome is my default dev browser. Did you try these? https://www.thepolyglotdeveloper.com/2014/08/bypass-cors-errors-testing-apis-locally/ https://chrome.google.com/webstore/detail/allow-control-allow-

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread doug777
Yes the second option fixed it. So now with the Chrome browser paused at line 137 "else if (readyState === 4) {" I can type in the console xhr.getResponseType("Content-type") and I get this strange response. VM624:1 Uncaught ReferenceError: xhr is not defined at eval (eval at org.apache.

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread doug777
Guess I should have typed this but still weird result this.xhr.getResponseType("Content-type") VM647:1 Uncaught TypeError: this.xhr.getResponseType is not a function at eval (eval at org.apache.flex.net.remoting.amf.AMFNetConnection.onReadyStateChange (AMFNetConnection.js:137), :1:10) at

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread Harbs
Whoops. The method is called getResponseHeader() Try: this.xhr.getResponseHeader("Content-type”) Harbs > On Sep 20, 2017, at 11:49 AM, doug777 wrote: > > Guess I should have typed this but still weird result > > this.xhr.getResponseType("Content-type") > > VM647:1 Uncaught TypeError: this.xh

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread doug777
Still no luck. Now it returns this this.xhr.getResponseHeader("Content-type”) VM833:1 Uncaught SyntaxError: Invalid or unexpected token at org.apache.flex.net.remoting.amf.AMFNetConnection.onReadyStateChange (AMFNetConnection.js:136) at org.apache.flex.net.remoting.amf.AMFNetConnection.ca

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread Piotr Zarzycki
Harbs, Alex, Is it possible that there is some messed up cause of this inject_html in RemoteObject ? [1] I remember that Alex said it is no needed anymore. [1] https://github.com/apache/flex-asjs/blob/develop/frameworks/projects/Network/src/main/flex/org/apache/flex/net/RemoteObject.as Thanks, P

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread Harbs
No idea. I have not looked into RemoteObject at all. Someone more familiar with it will have to comment. Harbs > On Sep 20, 2017, at 12:11 PM, Piotr Zarzycki > wrote: > > Harbs, Alex, > > Is it possible that there is some messed up cause of this inject_html in > RemoteObject ? [1] I remember

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread Alex Harui
@Doug, I just saw a StackOverflow topic where someone was getting that error because they cut and pasted the text instead of typing it and there was a hidden character in what they cut. If you haven't, please try typing it in manually. If you still can't get it to work, another option is to modi

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread doug777
Hi Alex, Yes that works. The result is "text/html;charset=UTF-8" Doug -- Sent from: http://apache-flex-users.246.n4.nabble.com/

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-20 Thread Alex Harui
Interesting. I don't think that is expected in AMF. And I noticed that xhr.response is null. That makes me think that the ColdFusion returned null instead of an AMF packet. Can you diagnose things on the server side? Maybe the request isn't formed correctly. Are you sure you have your "source

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-21 Thread doug777
Hi Alex, Yes you're right of course. In fact I think js:RemoteObject should be written exactly as it is in mx:RemoteObject. What I'm doing wrong I think, is to try to build and run from Moonshine. I think I should just build it in the IDE then take the release output upload it to the server and t

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-21 Thread Alex Harui
Hi Doug, I think it will be more efficient to debug the bin/js-debug version before trying to debug the js-release version. First check that AbstractMessage.js is in the bin/js-debug output from Moonshine, then copy the entire js-debug folder to the server and try to run it. If you are also gett

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-21 Thread doug777
AbstractMessage.js is in the output. When run, the debugger shows this at https://justpaste.it/1bjah No real error but there is no result from CF. There is no SWF output. Now I have just changed mx to js. Doug -- Sent from: http://apache-flex-users.246.n4.nabble.com/

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-21 Thread Alex Harui
Hi Doug, Earlier, you posted that your code looks like: http://localhost:8500/booxotel/STime.cfc"; result="roCheckTestResultHandler(event)" fault="roFaultHandler(event)"/> Comparing that to your mx:RemoteObject tag below, it might be worth changing your source property to be: source="booxo

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-21 Thread doug777
Sorry, what I meant was that I had changed the current code to The source is definitely booxotel.STime But I removed endPoint because that totally stops it working. Hello World does not appear and the error is Uncaught TypeError: Cannot read property 'IEventDispatcher' of undefined at ~core/

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-21 Thread Alex Harui
I'm pretty sure FlexJS RemoteObject requires an endpoint. The current implementation doesn't know about Channels and ChannelSets and services-config.xml. Is there more to the stack trace you get when you have an endpoint? Thanks, -Alex On 9/21/17, 11:43 PM, "doug777" wrote: >Sorry, what I mea

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-22 Thread doug777
Unfortunately not. This is all I get in the console IBeadModel.js:38 Uncaught TypeError: Cannot read property 'IEventDispatcher' of undefined at IBeadModel.js:38 Doug -- Sent from: http://apache-flex-users.246.n4.nabble.com/

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-22 Thread Alex Harui
I'm not sure what browser you are now using, but there should be a way to start up the debugger, have it stop on unhandled or uncaught exceptions and reload the page. Then the debugger should stop on that line and some other pane should show the stack trace. Thanks -Alex On 9/22/17, 12:51 AM, "d

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-22 Thread doug777
Stack trace is at https://justpaste.it/1bksx With the same setup, Hello World without RemoteObject code runs with no issues. Doug -- Sent from: http://apache-flex-users.246.n4.nabble.com/

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-22 Thread Alex Harui
Hi Doug, Can you zip up the MSTest folder and make it available somehow? Feel free to open a JIRA issue and attach the zip. It looks like the output is corrupted somehow. What browser and OS are you using? I may not have time to look until late Sunday (about 48 hours from now). Thanks, -Alex

Re: FlexJS RemoteObject Error with ColdFusion

2017-09-23 Thread doug777
JIRA created. I am only doing this in spare time for the moment, so time is not an issue. Thanks for all your help, Doug -- Sent from: http://apache-flex-users.246.n4.nabble.com/