This content has been marked as final. Show 7 replies
Most likely the issue is that the Flex client is not finding the CFC, so I'd verify that is not the case first.
Your MXML code doesn't have a RemoteObject tag; so it is hard to diagnose that.
Sorry, I did n't copy all the code, but yes it's calling the right cfc.
<mx:RemoteObject id="my_RO" destination="ColdFusion" source="myDomainFlex.cfcs.ordersGateway">
Do I have to call the orders.cfc also? or ordersGateway take care that part?
Based on the code [snippets] it looks like your CF code creates an instance of the orders; so you do not need to do so in Flex.
However, I do not see a saveOrder method in your CF code. I should have noticed that originally. Maybe you need to change to "save"
Great, I replace the name with saveOrder and now I have a different error:
[RPC Fault faultString="Unable to invoke CFC - The save method was not found." faultCode="Server.Processing" faultDetail="Either there are no methods with the specified method name and argument types, or the save method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that matched the provided arguments. If this is a Java object and you verified that the method exists, you may need to use the javacast function to reduce ambiguity."]
Generally, that message is what I get when it can't find the CFC. I don't use the CF gateway because I can't always have control over the CF server on some of the stuff so I call the CFC directly in the web site itself.
When I do it that way, it's important (sorry if this is review but just want to make sure you understand) to give the fully qualified path to the cfc in the remote object. So if I've got a website called http://www.myWeb.com and a cfc folder underneath, the remoteObject would have a source of something like
<mx:RemoteObject id="my_RO" source="myWeb.cfc.orders" destination="ColdFusion" />
Don't know if this provides any help but thought I'd mention it. The other thing that's kind of a pain in the butt to get going but really worth it in the long run is to get the step-through debugger working for CF in eclipse. Then you can go line by line debugging and see what's cooking during the call.
I don't understand the difference between using the CF Remoting Gateway and the approach you describe.
I'm not sure what else to tell you. Have you tried using a sniffer, such as ServiceCapture or Charles to see what is going on in the calls back and forth? Have you tried invoking the CFCs from a cfm page to be sure that they work? Have you tried running ColdFusion at the console to see if any errors are cropping up that are not obvious?
I keep running in circles trying to find out how this cfc's works. It has to be a way to find out from adobe the creation on the cfc wizard in how works... right?
I would like to take advantage of this auto code :), in the mean time I will keep writing my code for the cfc's