Skip to main content
Participant
August 3, 2008
Question

Flash Remoting from Flash (not Flex) via AMF3

  • August 3, 2008
  • 1 reply
  • 728 views
Hello,
I'm trying to fashion a flash application with AS3 under Flash against Coldfusion 8 via the AMF3 / flex2gateway. I receive this error on invocation:

Flex] Error handling message: flex.messaging.MessageException: Unable to find source to invoke
incomingMessage: Flex Message (flex.messaging.messages.RemotingMessage)
operation = player
clientId = 3C03BA13-2808-72A6-14BB-518DC8B490D2
destination = ColdFusion
messageId =
timestamp = 1217791691176
timeToLive = 1217791691176
body = null
hdr(DSEndpoint) = my-cfamf
errorReply: Flex Message (flex.messaging.messages.ErrorMessage)
clientId = 3C03BA13-2808-72A6-14BB-518DC8B490D2
correlationId =
destination = ColdFusion
messageId = 3C03BA13-2819-D62F-90EC-E1ADD77DB354
timestamp = 1217791691176
timeToLive = 0
body = null
code = Server.Processing
message = Unable to find source to invoke
details = null
rootCause = null
body = null
extendedData = null

<code>
public function RemotingTestInit () {
init ();
}

private function init() {
rs = new RemotingService(" http://dev.tcheeky.com/flex2gateway/");
var responder:Responder = new Responder(onResult, onFault);
var params:Object = new Object();
params.arg1 = "lib";
params.arg2 = "functions";
params.arg3 = "player";
params.arg4 = "doRead";
rs.call("ColdFusion.player", responder, "doRead()");
}

private function onResult(result:Object):void {
trace (result);
trace("test1");
for each (var item in result) {
trace("test2");
trace("item: " + typeof(item) );
if(typeof(item) == "object"){
trace("test3");
trace("item: " + typeof(item) ); ///-------?????DOES NOT WORK???
// trace( obj[item].getValue() ); // BOTH DO NOT WORK???

} else if(typeof(item) == "string"){
trace(item);
}
}
}

private function onFault(fault:Object):void {
trace(fault);
trace("testfail");
for each (var item in fault) {
trace("item: " + typeof(item) );
if(typeof(item) == "object"){
trace("item: " + typeof(item) ); ///-------?????DOES NOT WORK???
//trace( object[item].getValue() ); // BOTH DO NOT WORK???

} else if(typeof(item) == "string"){
trace(item);
}
}
</code>
This topic has been closed for replies.

1 reply

Known Participant
August 20, 2008
Sounds like you need to enable mappings for your remoting gateway. I'm not sure if it's the same as Flex, but here's what you might need to do, or something similar...

In c:\cfusion8\wwwroot\WEB-INF\flex\remoting-config.xml (or wherever CF is installed) look for the <use-mappings> node and set the value to true. You will need to restart CF