Flex Remoting (RPC)

http://www.flexafterdark.com/docs/Flex-Remoting

 

 

Flex Remoting (RPC)

Flex Remoting... The Flex Remoting API is in the mx.rpc package and sub-packages.

Types of RPC services:

  • HTTP - make HTTP calls to web servers
  • Web Services - call SOAP + WSDL based web-services
  • Remoting - call remote object servers such as ColdFusion or Java using BlazeDS

AsyncToken and Responder

Two objects are especially important when programming with Flex's Remoting/RPC APIs:

  1. An asynchronous call returns a token
    1. Any arbitrary information may be attached to the token for use later
  2. A responder is attached to the token
  3. ... (time passes)
  4. The call will result in either a result or a fault
    1. The responder's result function is called
    2. Or the responder's fault function is called
   var token:AsyncToken = httpService.send();
   token.data = "some data";
   
   var responder:IResponder = new ExampleResponder();
   token.addResponder( responder );
   ...

Related Docs:

posted @ 2011-12-13 14:11  Stranger  阅读(145)  评论(0编辑  收藏  举报