Packagesekati.rpc
Classpublic class RemotingService
InheritanceRemotingService Inheritance flash.net.NetConnection

RemotingService provides a basic remoting service wrapper for AMF Remoting (usually to AMFPHP). TODO - REQUIRES FIXING.


Example
   var rs : RemotingService = new RemotingService( "http://www.5etdemi.com/amfphp/gateway.php" );
   
   rs.addEventListener( ServiceEvent.FAULT, faultHandler );
   rs.addEventListener( ServiceEvent.RESULT, resultHandler );
   
   rs.execute( 'Class.method', {arg1:"foo", arg2:"13"} );
   
   protected function resultHandler(e : ServiceEvent) : void {
    trace( "RESULT.HANDLER:###:::::%%%%=> [" + e.result + "]" );
   } 
   
   protected function faultHandler(e : ServiceEvent) : void {
    trace( "FAULT.HANDLER:###:::::%%%%=> [" + e.fault + "]" );
   }  
  

See also

http://osflash.org/documentation/amf/recordset
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/Responder.html


Protected Properties
 PropertyDefined by
  responder : Responder
RemotingService
Public Methods
 MethodDefined by
  
RemotingService(gatewayURL:String)
RemotingService Constructor
RemotingService
  
execute(command:String, ... args):void
Execute a remote call.
RemotingService
Protected Methods
 MethodDefined by
  
callHandler(o:Object):void
Handle the call return; determine whether it is a result or a fault and dispatch the appropriate event.
RemotingService
  
faultHandler(fault:*):void
Dispatch information about failures.
RemotingService
  
resultHandler(result:*):void
Dispatch the results of a remoting method call.
RemotingService
Property detail
responderproperty
protected var responder:Responder
Constructor detail
RemotingService()constructor
public function RemotingService(gatewayURL:String)

RemotingService Constructor

Parameters
gatewayURL:String — the AMFPHP service gateway URL.
Method detail
callHandler()method
protected function callHandler(o:Object):void

Handle the call return; determine whether it is a result or a fault and dispatch the appropriate event.

Parameters
o:Object
execute()method 
public function execute(command:String, ... args):void

Execute a remote call.

Parameters
command:String — of the remote method
 
... args — to pass to remote method call.
faultHandler()method 
protected function faultHandler(fault:*):void

Dispatch information about failures.

Parameters
fault:*
resultHandler()method 
protected function resultHandler(result:*):void

Dispatch the results of a remoting method call.

Parameters
result:*