As3 Remoting in Coldbox

I have a pure Pure AS3 Application created in Flash that i need to get
working with Coldbox. The problem is that my remote calls can not find
any of my cfc methods. I always get back
"java.lang.NullPointerException".
And when I look in the Application logs I see

"ERROR","web-0","09/25/2010","11:22","","invalid component definition,
can't find RemoteProxy.

If I remove the root Application.cfc file my calls go through with no
problems to any of my cfcs.

I have tried calling the proxy.cfc and some cfc directly with no
success.

Ex Remote Call

var nc:NetConnection = new NetConnection();
nc.connect("http://xxxxxxxxxxxx/openamf/gateway" );
nc.client = this;

nc.call( "model.flex.myFunction", new Responder( onResult, onFault ),
"hello");
function onResult(responder:Object):void {

      trace('It worked');
    }

     function onFault(responder:Object):void {
      var i=0;
      trace(responder);
      for (i in responder) {
        trace(responder[i]);
        //ect.
      }
    }

Thanks
Heath

Have you tried writing a handler and calling the handler instead?

Regards,
Andrew Scott
http://www.andyscott.id.au/

From: coldbox@googlegroups.com [mailto:coldbox@googlegroups.com] On
Behalf Of heath
Sent: Sunday, 26 September 2010 1:40 AM
To: ColdBox Platform
Subject: [coldbox:5916] As3 Remoting in Coldbox

I have a pure Pure AS3 Application created in Flash that i need to get

working

with Coldbox. The problem is that my remote calls can not find any of my

cfc

methods. I always get back "java.lang.NullPointerException".
And when I look in the Application logs I see

"ERROR","web-0","09/25/2010","11:22","","invalid component definition,
can't find RemoteProxy.

If I remove the root Application.cfc file my calls go through with no

problems

Heath,

Once you make a flash remoting call to a CFC from flex or flash it first hits the Application.cfc and executes the onRequestStart() method which prepares the ColdBox application. In order for this to work, you MUST have set the appMapping in your Application.cfc so ColdFusion can locate your components.

This setting is the location of the application from the web root. So if it is in the webroot then leave it blank. So this is the first thing to do.

Second, create ColdBox remote proxies with REMOTE access functions so flash/flex can execute them. Then from those CFC remote functions, you can proxy requests to your coldbox application using the proxy’s “process()” method.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com