Re: [flexcoders] Re: Remote object help again..
Mark you advice worked like a charm. It now sees my destinations. And thanks to you jeff, that is a handy trick. On 8/23/06, Mark Piller [EMAIL PROTECTED] wrote: Hey Jeff, This is very helpful. I didn't know about the trace(ServerConfig.xml) trick. Would it make sense to add some special logic to the compiler to validate all destinations in the code? That would need to apply to all mx:RemoteObject declarations as well as ro.destination = xxx type of assignments. Cheers, Mark --- In flexcoders@yahoogroups.com, Jeff Vroom [EMAIL PROTECTED] wrote: I have not heard of this caching bug before, but I'll follow up and see Flex Builder is doing any caching that might cause this. It is the case that when you compile your SWF, the compiler needs to have a pointer to your services-config.xml file. It includes a subset of the destination configuration into the SWF. You can see what it has included when you enable debug logging on the client (e.g. via: mx:TraceTarget/), or you can just trace it out via: import mx.messaging.config.ServerConfig; trace(ServerConfig.xml); When I've seen this problem in the past, it was due to the fact that the compiler's configuration did not include a pointer to the correct services-config.xml. Jeff From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Mark Piller Sent: Wednesday, August 23, 2006 12:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Remote object help again.. Did you add your destination after your Flex Builder project was created? We hear about this problem quite often. It appears Flex Builder caches remoting-config.xml and does not fetch the file every time you build the project. As a result, if a destination is added after the project is created, it will not be recognized unless you do one of the following: - restart Flex Builder - open project properties window, select the 'Flex Compiler' section and click 'Apply' It would be very helpful to get a confirmation from Adobe for this bug. Thanks, Mark --- In flexcoders@yahoogroups.com mailto: flexcoders%40yahoogroups.com , Jeremy Rottman rottmanList@ wrote: I am working on a simple application that uses remote objects to pass data to and from my db. But I keep running into the same problem. In my services-config.xml file, I have setup the destination ROTEST. It looks like this destination id=ROTEST channels channel ref=my-cfamf/ /channels properties sourcebeta.cfc.ROtest/source !-- define the resolution rules and access level of the cfc being invoked -- access !-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. -- use-mappingsfalse/use-mappings !-- allow public and remote or just remote methods to be invoked -- method-access-levelremote/method-access-level /access property-case !-- cfc property names -- force-cfc-lowercasefalse/force-cfc-lowercase !-- Query column names -- force-query-lowercasefalse/force-query-lowercase !-- struct keys -- force-struct-lowercasefalse/force-struct-lowercase /property-case /properties /destination I wrote this simple flex application to test my connectivity. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute mx:Script ![CDATA[ import mx.controls.Alert; import mx.rpc.Fault; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; private function qryService_userSearch(lastName){ qryService.userSearch(lastName) } private function qryService_userSearch_Result(event:ResultEvent):void{ testDG.dataProvider = event.result; } private function qryService_userSearch_Fault(event:FaultEvent):void{ errorText.text = event.fault.message; } ]] /mx:Script mx:RemoteObject id=qryService destination=ROTEST result=qryService_userSearch_Result(event) endpoint=http://beta.homesmartagent.com/flex2gateway/ http://beta.homesmartagent.com/flex2gateway/ showBusyCursor=true fault=qryService_userSearch_Fault(event)/ mx:Canvas x=0 y=0 width=100% height=100% mx:Label x=10 y=10 text=Name:/ mx:TextInput id=lastName x=60 y=8/ mx:Button x=228 y=8 click=qryService_userSearch(lastName.text) label=Button/ mx:DataGrid x=10 y=38 id=testDG width=779 height=326 mx:columns mx:DataGridColumn headerText=Column 1 dataField=fld_agentFullName/ mx:DataGridColumn headerText=Column 2 dataField=fld_agentId/ mx:DataGridColumn headerText=Column 3 dataField=fld_agentEmail/ /mx:columns /mx:DataGrid mx:TextArea x=10 y=372 id=errorText width=523 height=221/ /mx:Canvas /mx:Application Everytime I test the application, I get this error. faultCode:Server.Processing
RE: [flexcoders] Re: Remote object help again..
I have not heard of this caching bug before, but Ill follow up and see Flex Builder is doing any caching that might cause this. It is the case that when you compile your SWF, the compiler needs to have a pointer to your services-config.xml file. It includes a subset of the destination configuration into the SWF. You can see what it has included when you enable debug logging on the client (e.g. via: mx:TraceTarget/), or you can just trace it out via: import mx.messaging.config.ServerConfig; . trace(ServerConfig.xml); When Ive seen this problem in the past, it was due to the fact that the compilers configuration did not include a pointer to the correct services-config.xml. Jeff From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] On Behalf Of Mark Piller Sent: Wednesday, August 23, 2006 12:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Remote object help again.. Did you add your destination after your Flex Builder project was created? We hear about this problem quite often. It appears Flex Builder caches remoting-config.xml and does not fetch the file every time you build the project. As a result, if a destination is added after the project is created, it will not be recognized unless you do one of the following: - restart Flex Builder - open project properties window, select the 'Flex Compiler' section and click 'Apply' It would be very helpful to get a confirmation from Adobe for this bug. Thanks, Mark --- In [EMAIL PROTECTED]ups.com, Jeremy Rottman rottmanList@... wrote: I am working on a simple application that uses remote objects to pass data to and from my db. But I keep running into the same problem. In my services-config.xml file, I have setup the destination ROTEST. It looks like this destination id=ROTEST channels channel ref=my-cfamf/ /channels properties sourcebeta.cfc.ROtest/source !-- define the resolution rules and access level of the cfc being invoked -- access !-- Use the ColdFusion mappings to find CFCs, by default only CFC files under your webroot can be found. -- use-mappingsfalse/use-mappings !-- allow public and remote or just remote methods to be invoked -- method-access-levelremote/method-access-level /access property-case !-- cfc property names -- force-cfc-lowercasefalse/force-cfc-lowercase !-- Query column names -- force-query-lowercasefalse/force-query-lowercase !-- struct keys -- force-struct-lowercasefalse/force-struct-lowercase /property-case /properties /destination I wrote this simple flex application to test my connectivity. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml layout=absolute mx:Script ![CDATA[ import mx.controls.Alert; import mx.rpc.Fault; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; private function qryService_userSearch(lastName){ qryService.userSearch(lastName) } private function qryService_userSearch_Result(event:ResultEvent):void{ testDG.dataProvider = event.result; } private function qryService_userSearch_Fault(event:FaultEvent):void{ errorText.text = event.fault.message; } ]] /mx:Script mx:RemoteObject id=qryService destination=ROTEST result=qryService_userSearch_Result(event) endpoint=http://beta.homesmartagent.com/flex2gateway/ showBusyCursor=true fault=qryService_userSearch_Fault(event)/ mx:Canvas x=0 y=0 width=100% height=100% mx:Label x=10 y=10 text=Name:/ mx:TextInput id=lastName x=60 y=8/ mx:Button x=228 y=8 click=qryService_userSearch(lastName.text) label=Button/ mx:DataGrid x=10 y=38 id=testDG width=779 height=326 mx:columns mx:DataGridColumn headerText=Column 1 dataField=fld_agentFullName/ mx:DataGridColumn headerText=Column 2 dataField=fld_agentId/ mx:DataGridColumn headerText=Column 3 dataField=fld_agentEmail/ /mx:columns /mx:DataGrid mx:TextArea x=10 y=372 id=errorText width=523 height=221/ /mx:Canvas /mx:Application Everytime I test the application, I get this error. faultCode:Server.Processing faultString:'No destination 'ROTEST' exists in service flex.messaging.services.RemotingService' faultDetail:'null' I know my destination exists in my services-config.xml file, but for some reason it can not find it. I have set the channel correctly in my services-config.xml file as well. channels channel-definition id=my-cfamf class=mx.messaging.channels.AMFChannel endpoint uri=http://beta.homesmartagent.com/flex2gateway/ class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled serialization instantiate-typesfalse/instantiate-types /serialization /properties /channel-definition /channels Can someone shed some light on this for me. __._,_.___ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com