My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
CallServiceFromFlex  
Example code that remotely invokes a Command and a Selection on a Service
Updated Feb 4, 2010 by ernest.m...@gmail.com

Introduction

Details

The pocogese Flex framework provides a wrapper for the standard Flex HttpService to handle commands and selections. In particular, it handles FaultEvents for you which is explained in HandlingExceptionInFlex. Read the HttpClient API from the sources.

Examples

Use the pocogese HttpClient to call methods of your service Controller.

public function testGetAllUsers():void {
   var httpClient:HttpClient  = new HttpClient("e4x")
   httpClient.send_get("http://localhost:3000/user/service/getAllUsers", handleGetAllUsers)
}

public function handleGetAllUsers(data:XML):void {
   trace("handleGetAllUsers:"+data)
}

The following example uses the generated controller client UserControllerClient

public function testGetAllUsers():void {
   var uc:UserController = new UserControllerClient("http://localhost:3000/")
   uc.getAllUsers(handleGetAllUsers)
}

Sign in to add a comment
Powered by Google Project Hosting