Search Flex Components Free

Custom Search

January 1, 2008

Calling a service

You can declare an RPC component and call the service in MXML or ActionScript. Regardless of the source of input data, calls to a service are asynchronous and require an ActionScript method, called an event listener, which is called after the RPC call is completed.
The two general categories of events are user events and system events. User events occur as a result of user interaction with the application; for example, when a user clicks a Button control a user event occurs. System events occur as a result of systematic code execution. For information about events, see Using Events.
Flex provides two ways to call a service: explicit parameter passing and parameter binding. You can use explicit parameter passing when you declare an RPC component in MXML or ActionScript. Parameter binding is only available when you declare an RPC component in MXML.
You can use an RPC component's requestTimeout property to define the number of seconds to allow a request to remain outstanding before timing it out. The requestTimeout property is available on RemoteObject, HTTPService, and WebService components.
Subtopics
Using explicit parameter passing
Using parameter binding

Related Flex Tutorials