|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
Flash Remoting Call Timing OutI'm trying to get going with some Flash Remoting from Flex, but I'm having a tough time of it. My requests from Flex seem to time out, but if I call the same CFC/method, called via http://mysite/cfc/myCfc.cfc?method=myMethod syntax, it works right away.
Any ideas as to how to fix or troubleshoot this? Please let me know what more info you might need from me in order to help. Thanks, Jamie Here's my CFC's method: (/cfc/AddressService.cfc?method=getStates) ==================================================== <cffunction name="getStates" access="remote" output="false" returntype="query"> <cfset var local = structNew() /> <cfscript> local.states = querySim(' stateID,countryID,state,state_abbr 1|1|Alabama|AL 2|1|Alaska|AK ....snip... 58|1|Wyoming|WY '); return local.states; </cfscript> </cffunction> <cffunction name="getCountries" access="public" output="false" returntype="any"> <cfreturn countries /> </cffunction> Here's the service setup in MXML ========================================== <mx:RemoteObject id="addressService" source="cfc/AddressService" destination="ColdFusion" fault="faultHandler(event)" requestTimeout="10"> <mx:method name="getStates" result="resultHandler(event)"/> </mx:RemoteObject> In Flex, I'm having my app dump its error: ========================================== Request timed out And here's what I get from the CF console: =========================================== [Flex] null java.lang.IllegalStateException at jrun.servlet.JRunResponse.getOutputStream(JRunResponse.java:183) at flex.messaging.endpoints.AMFEndpoint.service(AMFEndpoint.java:140) at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:438) at coldfusion.flex.ColdFusionMessageBrokerServlet.service(ColdFusionMessageBrokerServlet.java:50) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) at coldfusion.filter.FlashRequestControlFilter.doFilter(FlashRequestControlFilter.java:71) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) at jrun.servlet.FilterChain.service(FilterChain.java:101) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5599 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing Outyour source is wrong. Flex uses a . syntax same as Coldfusion when calling
cfcs. your source should read cfc.AddressService HTH Rob On Thu, Dec 18, 2008 at 8:48 PM, Jamie Jackson <jacksonj@...> wrote: > I'm trying to get going with some Flash Remoting from Flex, but I'm having > a tough time of it. My requests from Flex seem to time out, but if I call > the same CFC/method, called via > http://mysite/cfc/myCfc.cfc?method=myMethod syntax, it works right away. > > Any ideas as to how to fix or troubleshoot this? Please let me know what > more info you might need from me in order to help. > > Thanks, > Jamie > > Here's my CFC's method: (/cfc/AddressService.cfc?method=getStates) > ==================================================== > <cffunction name="getStates" access="remote" output="false" > returntype="query"> > <cfset var local = structNew() /> > <cfscript> > local.states = querySim(' > stateID,countryID,state,state_abbr > 1|1|Alabama|AL > 2|1|Alaska|AK > ....snip... > 58|1|Wyoming|WY > '); > return local.states; > </cfscript> > </cffunction> > > <cffunction name="getCountries" access="public" output="false" > returntype="any"> > <cfreturn countries /> > </cffunction> > > Here's the service setup in MXML > ========================================== > <mx:RemoteObject id="addressService" > source="cfc/AddressService" > destination="ColdFusion" > fault="faultHandler(event)" > requestTimeout="10"> > <mx:method name="getStates" result="resultHandler(event)"/> > </mx:RemoteObject> > > In Flex, I'm having my app dump its error: > ========================================== > Request timed out > > > And here's what I get from the CF console: > =========================================== > [Flex] null > java.lang.IllegalStateException > at jrun.servlet.JRunResponse.getOutputStream(JRunResponse.java:183) > at > flex.messaging.endpoints.AMFEndpoint.service(AMFEndpoint.java:140) > at > flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:438) > at > coldfusion.flex.ColdFusionMessageBrokerServlet.service(ColdFusionMessageBrokerServlet.java:50) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > at > coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) > at jrun.servlet.FilterChain.doFilter(FilterChain.java:86) > at > coldfusion.filter.FlashRequestControlFilter.doFilter(FlashRequestControlFilter.java:71) > at > coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) > at jrun.servlet.FilterChain.doFilter(FilterChain.java:94) > at jrun.servlet.FilterChain.service(FilterChain.java:101) > at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) > at > jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) > at > jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286) > at > jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) > at > jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) > at > jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) > at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66) > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5600 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutThanks for the suggestion, but I don't think it's the ticket.
I get the same behavior with "/" and with "." ...see the following. Thanks for the idea though, please keep them coming. :) cfc.AddressService yields: Request timed out cfc/AddressService yields: Request timed out cfc.blah.AddressService yields: Unable to invoke CFC - Could not find the ColdFusion Component or Interface cfc.blah.AddressService. cfc/blah/AddressService yields: Unable to invoke CFC - Could not find the ColdFusion Component or Interface cfc/blah/AddressService. >your source is wrong. Flex uses a . syntax same as Coldfusion when calling >cfcs. >your source should read cfc.AddressService > >HTH > >Rob > >On Thu, Dec 18, 2008 at 8:48 PM, Jamie Jackson <jacksonj@...> wrote: > >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5601 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutHave you tried removing your request timeout? It is set to 10. I would
unset it if you are having timeout problems, perhaps that will reveal another issue, or solve the problem. Rob ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5602 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutI added the timeout because I got bored of the waits. The operation should take very little time.
When I ran the flex debugger without a timeout, I noticed that it went into some kind of re-queueing routine (into native Flex AS classes) seemingly ad infinitum. I just now set a timeout of 60 seconds, and same timeout. Now I'll do it again without a timeout, but AFAIK, it's not going to end up telling me anything, unfortunately. I'll report back if it does, though. Jamie >Have you tried removing your request timeout? It is set to 10. I would >unset it if you are having timeout problems, perhaps that will reveal >another issue, or solve the problem. >Rob ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5603 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutJamie Jackson wrote:
> cfc.AddressService yields: i missed the beginning of this but...is the cfc dir a web accessible dir under the webroot or is it a cf mapped dir? if a mapped dir, did you turn on mapped dirs in remoting-config.xml (web-inf/flex dir): <!-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. --> <use-mappings>true</use-mappings> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5604 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing Outwhat happens when you don't run it through the flex debugger? Have you
tried setting up a new project and just calling the CFC from it? Perhaps there is a setting off in the current flex project? Where are the CFCs stored? Rob On Thu, Dec 18, 2008 at 9:54 PM, Jamie Jackson <jacksonj@...> wrote: > I added the timeout because I got bored of the waits. The operation should > take very little time. > > When I ran the flex debugger without a timeout, I noticed that it went into > some kind of re-queueing routine (into native Flex AS classes) seemingly ad > infinitum. > > I just now set a timeout of 60 seconds, and same timeout. Now I'll do it > again without a timeout, but AFAIK, it's not going to end up telling me > anything, unfortunately. I'll report back if it does, though. > > Jamie > > >Have you tried removing your request timeout? It is set to 10. I would > >unset it if you are having timeout problems, perhaps that will reveal > >another issue, or solve the problem. > >Rob > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5605 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutThanks for the suggestion. I did just learn about use-mappings this afternoon.
The CFC I'm calling is indeed under the web root, though. >Jamie Jackson wrote: >> cfc.AddressService yields: > >i missed the beginning of this but...is the cfc dir a web accessible dir under >the webroot or is it a cf mapped dir? if a mapped dir, did you turn on mapped >dirs in remoting-config.xml (web-inf/flex dir): > ><!-- Use the ColdFusion mappings to find CFCs, by default only CFC files under >your webroot can be found. --> ><use-mappings>true</use-mappings> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5606 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing Out>what happens when you don't run it through the flex debugger?
I'll try the non-debugger Flash player and see if it makes a difference, to rule out debugging related stuff. >Have you >tried setting up a new project and just calling the CFC from it? Perhaps >there is a setting off in the current flex project? Yeah, there could be, and it could easily be something like that, but I'm too new to FB to be able to easily spot something that's amiss. >Where are the CFCs >stored? Under the web root, in a dir called cfc, but let me know if you need more detail than that. >Rob > >On Thu, Dec 18, 2008 at 9:54 PM, Jamie Jackson <jacksonj@...> wrote: > >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5608 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing Outbut the CF8 web root? so coldfusion8/wwwroot/cfc/AddressService.cfc
Rob On Thu, Dec 18, 2008 at 10:19 PM, Jamie Jackson <jacksonj@...> wrote: > Thanks for the suggestion. I did just learn about use-mappings this > afternoon. > > The CFC I'm calling is indeed under the web root, though. > > >Jamie Jackson wrote: > >> cfc.AddressService yields: > > > >i missed the beginning of this but...is the cfc dir a web accessible dir > under > >the webroot or is it a cf mapped dir? if a mapped dir, did you turn on > mapped > >dirs in remoting-config.xml (web-inf/flex dir): > > > ><!-- Use the ColdFusion mappings to find CFCs, by default only CFC files > under > >your webroot can be found. --> > ><use-mappings>true</use-mappings> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5607 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing Out>but the CF8 web root? so coldfusion8/wwwroot/cfc/AddressService.cfc
>Rob Ahh, okay. I've got multi-server, so my paths don't match up quite like that, but no, it's in my virtual host web root, not under the CF8 wwwroot (which is /opt/jrun4/servers/childwelfare_old/cfusion.ear/cfusion.war, I think). ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5609 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing Outso then you will have to do what Paul suggested and edit the file to go to
the correct web root :) On Thu, Dec 18, 2008 at 10:26 PM, Jamie Jackson <jacksonj@...> wrote: > >but the CF8 web root? so coldfusion8/wwwroot/cfc/AddressService.cfc > >Rob > > Ahh, okay. I've got multi-server, so my paths don't match up quite like > that, but no, it's in my virtual host web root, not under the CF8 wwwroot > (which is /opt/jrun4/servers/childwelfare_old/cfusion.ear/cfusion.war, I > think). > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5610 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing Out>so then you will have to do what Paul suggested and edit the file to go to
>the correct web root :) So is there no way to put the CFCs in any other place, and have them still work? It seems bizarre to require that flash remoting apps need some files to go over here (in the virtual host root), and some to go over there (in the "CF" web root). But is that the way it has to work? Consider this. Here's the way I wanted it to work. Say my virtual host doc root is: /var/www/apps/myapp/wwwroot/ My internal CFCs are here: /var/www/apps/model/ And my remote apps (that serve as remote proxies for my internal CFCs) are here: /var/www/apps/model/cfc/ My Flex app is here: /var/www/apps/myapp/wwwroot/flex/ Is that not possible? If not, why? This stuff is still pretty new and foreign to me. Thanks again, Jamie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5611 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing Out> >so then you will have to do what Paul suggested and edit the file to
> go to > >the correct web root :) > > So is there no way to put the CFCs in any other place, and have them > still work? It seems bizarre to require that flash remoting apps need > some files to go over here (in the virtual host root), and some to go > over there (in the "CF" web root). But is that the way it has to > work? > > Consider this. Here's the way I wanted it to work. Bah, I messed up those paths, so just to correct them to avoid confusion: Say my virtual host doc root is: /var/www/apps/myapp/wwwroot/ My internal CFCs are here: /var/www/apps/myapp/model/ And my remote CFCs (that serve as remote proxies for my internal CFCs) are here: /var/www/apps/myapp/wwwroot/cfc/ My Flex app is here: /var/www/apps/myapp/wwwroot/flex/ > Is that not possible? If not, why? This stuff is still pretty new and > foreign to me. > > Thanks again, > Jamie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5612 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing Outyes there is a way, you add the dir to your CF mapping and then in your flex
install edit the config to look for CFCs inside the CF mapped directories. Your situation will work fine, with external and internal CFCs just that the external CFC directory has to be known to CF so that it can share it with Flex when needed. to do so, go to your ColdFusion 8 (i presume 8) install directory, go to the wwwroot dir, open the web-inf dir, open the flex dir, open the remoting-config.xml in there you will find the following: <access> <!-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. --> <use-mappings>true</use-mappings> **** Change this to TRUE <!-- allow "public and remote" or just "remote" methods to be invoked --> <method-access-level>remote</method-access-level> </access> then you can use the local references from your mapped dir to get to your CFCs, and this would be a one-time thing. I personally don't have a multi-server model, so I can't say if there is anything else required for that. Rob Rob On Thu, Dec 18, 2008 at 10:56 PM, Jamie Jackson <jacksonj@...> wrote: > > >so then you will have to do what Paul suggested and edit the file to > > go to > > >the correct web root :) > > > > So is there no way to put the CFCs in any other place, and have them > > still work? It seems bizarre to require that flash remoting apps need > > some files to go over here (in the virtual host root), and some to go > > over there (in the "CF" web root). But is that the way it has to > > work? > > > > Consider this. Here's the way I wanted it to work. > > Bah, I messed up those paths, so just to correct them to avoid confusion: > > Say my virtual host doc root is: > /var/www/apps/myapp/wwwroot/ > > My internal CFCs are here: > /var/www/apps/myapp/model/ > > And my remote CFCs (that serve as remote proxies for my internal CFCs) are > here: > /var/www/apps/myapp/wwwroot/cfc/ > > My Flex app is here: > /var/www/apps/myapp/wwwroot/flex/ > > > Is that not possible? If not, why? This stuff is still pretty new and > > foreign to me. > > > > Thanks again, > > Jamie > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5613 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutJamie,
cfcs don't need to be directly exposed under the webroot, I also use your approach by putting them under some other folder and I also use multiserver version. The only thing you'll need, like others mentioned, is to set use mappings = true so the MessageBroker /flex2gateway endpoint use any mappings used by that application. Using Application.cfc you can use <cfset this.mappings['/model'] = '/var/www/apps/myapp/model/'/> and then your remote project just have to use invoke them using createObject('component','model.pathToYourDesiredCFC'); -- João Fernandes Adobe Community Expert http://www.onflexwithcf.org http://www.riapt.org Portugal Adobe User Group (http://aug.riapt.org) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5614 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutThanks João and Rob.
Unfortunately, I think I already have the things in place that you mentioned. Let me recap everything I've got. Please let me know if you see anything wrong, or if you need to see anything else. The following always times out from Flex, but works every time, right away, from http://myapp.localhost/cfc/AddressService.cfc?method=getStates Here are all the details I can think of: My virtual host doc root is: /var/www/apps/myapp/wwwroot/ My internal CFCs are here: /var/www/apps/myapp/model/ And my remote CFCs (that serve as remote proxies for my internal CFCs) are here: /var/www/apps/myapp/wwwroot/cfc/ My Flex app is here: /var/www/apps/myapp/wwwroot/flex/ "/myapp" CF Mapping points here: /var/www/apps/myapp Here's the relevant bit from my remoting-config.xml file: <access> <!-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. --> <use-mappings>true</use-mappings> <!-- allow "public and remote" or just "remote" methods to be invoked --> <method-access-level>remote</method-access-level> </access> My Flex RemoteObject is defined like this: <!-- I've tried it with both myapp.wwwroot.cfc.AddressService and cfc.AddressService --> <mx:RemoteObject id="addressService" source="myapp.wwwroot.cfc.AddressService" destination="ColdFusion" fault="faultHandler(event)" > <!-- This service's returned query has the following columns: stateID,countryID,state,state_abbr notice that it has a specific result handler --> <mx:method name="getStates" result="resultHandler(event)"/> </mx:RemoteObject> And the method it calls looks like this: <cffunction name="getStates" access="remote" output="false" returntype="query"> <cfset var local = structNew() /> <cfscript> local.states = querySim(' stateID,countryID,state,state_abbr .... snip ... 58|1|Wyoming|WY '); return local.states; </cfscript> </cffunction> >Jamie, > >cfcs don't need to be directly exposed under the webroot, I also use >your approach by putting them under some other folder and I also use >multiserver version. The only thing you'll need, like others mentioned, >is to set use mappings = true so the MessageBroker /flex2gateway >endpoint use any mappings used by that application. > >Using Application.cfc you can use <cfset this.mappings['/model'] = >'/var/www/apps/myapp/model/'/> and then your remote project just have to >use invoke them using >createObject('component','model.pathToYourDesiredCFC'); >-- > >João Fernandes > >Adobe Community Expert >http://www.onflexwithcf.org >http://www.riapt.org >Portugal Adobe User Group (http://aug.riapt.org) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5615 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutWait, I think I might be on way towards fixing this. I think the symptoms were misleading me as to the source of the problem. I'll post back with the resolution if I fix it.
Jamie > Thanks João and Rob. > > Unfortunately, I think I already have the things in place that you > mentioned. Let me recap everything I've got. Please let me know if you > see anything wrong, or if you need to see anything else. > > The following always times out from Flex, but works every time, right > away, from > http://myapp.localhost/cfc/AddressService.cfc?method=getStates > > Here are all the details I can think of: > > My virtual host doc root is: > /var/www/apps/myapp/wwwroot/ > > My internal CFCs are here: > /var/www/apps/myapp/model/ > > And my remote CFCs (that serve as remote proxies for my internal CFCs) > are here: > /var/www/apps/myapp/wwwroot/cfc/ > > My Flex app is here: > /var/www/apps/myapp/wwwroot/flex/ > > "/myapp" CF Mapping points here: > /var/www/apps/myapp > > Here's the relevant bit from my remoting-config.xml file: > <access> > > <!-- Use the ColdFusion mappings to find CFCs, by default only CFC > files under your webroot can be found. --> > > <use-mappings>true</use-mappings> > > <!-- allow "public and remote" or just "remote" methods to be invoked > --> > > <method-access-level>remote</method-access-level> > > </access> > > My Flex RemoteObject is defined like this: > <!-- I've tried it with both myapp.wwwroot.cfc.AddressService and cfc. > AddressService --> > <mx:RemoteObject id="addressService" > source="myapp.wwwroot.cfc.AddressService" > destination="ColdFusion" > fault="faultHandler(event)" > > > <!-- This service's returned query has the following columns: > stateID,countryID,state,state_abbr > notice that it has a specific result handler --> > <mx:method name="getStates" result="resultHandler(event)"/> > </mx:RemoteObject> > > And the method it calls looks like this: > <cffunction name="getStates" access="remote" output="false" > returntype="query"> > <cfset var local = structNew() /> > <cfscript> > local.states = querySim(' > stateID,countryID,state,state_abbr > snip ... > 58|1|Wyoming|WY > '); > return local.states; > </cfscript> > </cffunction> > > > >Jamie, > > > >cfcs don't need to be directly exposed under the webroot, I also use > > >your approach by putting them under some other folder and I also use > > >multiserver version. The only thing you'll need, like others > mentioned, > >is to set use mappings = true so the MessageBroker /flex2gateway > >endpoint use any mappings used by that application. > > > >Using Application.cfc you can use <cfset this.mappings['/model'] = > >'/var/www/apps/myapp/model/'/> and then your remote project just have > to > >use invoke them using > >createObject('component','model.pathToYourDesiredCFC'); > >-- > > > >João Fernandes > > > >Adobe Community Expert > >http://www.onflexwithcf.org > >http://www.riapt.org > >Portugal Adobe User Group (http://aug.riapt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5616 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutIf you are loading as
http://myapp.localhost/cfc/AddressService.cfc?method=getStates you can't use <mx:RemoteObject id="addressService" source="myapp.wwwroot.cfc.AddressService" ... but you should use instead <mx:RemoteObject id="addressService" source="cfc.AddressService" ... -- João Fernandes Adobe Community Expert http://www.onflexwithcf.org http://www.riapt.org Portugal Adobe User Group (http://aug.riapt.org) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5617 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
|
|
Re: Flash Remoting Call Timing OutThe main app's Application.cfm was doing strange things in the context of an AMF call, and causing misleading symptoms.
Here's what finally fixed it: I put a new Application.cfm in my (external) cfc directory, and used <cfapplication name="myMainApp'sAppName" />. This way, I'm using the main app's app variables (which are all I need from it), but I'm disinheriting all the garbage that's in the main app's Application.cfm. Thanks very much to both of you, as your help jumpstarted my change of tack! Jamie > Wait, I think I might be on way towards fixing this. I think the > symptoms were misleading me as to the source of the problem. I'll post > back with the resolution if I fix it. > > Jamie > > > Thanks João and Rob. > > > > Unfortunately, I think I already have the things in place that you > > mentioned. Let me recap everything I've got. Please let me know if > you > > see anything wrong, or if you need to see anything else. > > > > The following always times out from Flex, but works every time, > right > > away, from > > http://myapp.localhost/cfc/AddressService.cfc?method=getStates > > > > Here are all the details I can think of: > > > > My virtual host doc root is: > > /var/www/apps/myapp/wwwroot/ > > > > My internal CFCs are here: > > /var/www/apps/myapp/model/ > > > > And my remote CFCs (that serve as remote proxies for my internal > CFCs) > > are here: > > /var/www/apps/myapp/wwwroot/cfc/ > > > > My Flex app is here: > > /var/www/apps/myapp/wwwroot/flex/ > > > > "/myapp" CF Mapping points here: > > /var/www/apps/myapp > > > > Here's the relevant bit from my remoting-config.xml file: > > <access> > > > > > <!-- Use the ColdFusion mappings to find CFCs, by default only CFC > > files under your webroot can be found. --> > > > > > <use-mappings>true</use-mappings> > > > > > <!-- allow "public and remote" or just "remote" methods to be > invoked > > --> > > > > > <method-access-level>remote</method-access-level> > > > > </access> > > > > My Flex RemoteObject is defined like this: > > <!-- I've tried it with both myapp.wwwroot.cfc.AddressService and > cfc. > > AddressService --> > > > <mx:RemoteObject id="addressService" > > source="myapp.wwwroot.cfc.AddressService" > > destination="ColdFusion" > > fault="faultHandler(event)" > > > > > <!-- This service's returned query has the following columns: > > stateID,countryID,state,state_abbr > > notice that it has a specific result handler --> > > <mx:method name="getStates" result="resultHandler(event)"/> > > </mx:RemoteObject> > > > > And the method it calls looks like this: > > <cffunction name="getStates" access="remote" output="false" > > returntype="query"> > > <cfset var local = structNew() /> > > <cfscript> > > local.states = querySim(' > > stateID,countryID,state,state_abbr > > > snip ... > > 58|1|Wyoming|WY > > '); > > return local.states; > > </cfscript> > > </cffunction> > > > > > > >Jamie, > > > > > >cfcs don't need to be directly exposed under the webroot, I also > use > > > > >your approach by putting them under some other folder and I also > use > > > > >multiserver version. The only thing you'll need, like others > > mentioned, > > >is to set use mappings = true so the MessageBroker /flex2gateway > > >endpoint use any mappings used by that application. > > > > > >Using Application.cfc you can use <cfset this.mappings['/model'] = > > > >'/var/www/apps/myapp/model/'/> and then your remote project just > have > > to > > >use invoke them using > > >createObject('component','model.pathToYourDesiredCFC'); > > >-- > > > > > >João Fernandes > > > > > >Adobe Community Expert > > >http://www.onflexwithcf.org > > >http://www.riapt.org > > >Portugal Adobe User Group (http://aug.riapt. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/flex/message.cfm/messageid:5618 Subscription: http://www.houseoffusion.com/groups/flex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=17837.14401.37 |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |