Flex 2 and Remoting.

I am comfortable with the .Net remoting and AMFPHP in both Flash MX and AS2. I was wondering how I will call a remote method from the flex client. This question has lead me to understand how flex client and Flex Enterprise Sever communicates with each other.

I have found the following three types of data Services in FES 2.

  • Flex Data Service
  • Flex Message Service
  • RPC Services

Today I want to focus on RPC Services only.

A Flex client can access back-end data using SOAP-based web services, web services (XML over HTTP), or by directly invoking methods in remote objects deployed in the application server.

In Flex Data Services, these three alternatives are collectively referred to as RPC services. In general, using the RPC approach, In this approach we typically start by invoking a method on a remote service to obtain a set of data.

After going through all these I know you would ask me to stop theory and show you the steps to do remoting in Flex 2.

Well,I know you are right if you said so.There are plenty of documentation around to explain how flex data service works.

Flex uses remoteObject tag to directly invoke methods in Java objects deployed in the application server.

In Flex 2.0, every remote object must be configured as a Remoting Service destination in the
flex-enterprise-services.xml file, or a file that it includes by reference. You reference a
destination in the destination property of the tag.You will find this file in your webapp folder of the FES where you will deploy your Flex Application.

flex-enterprise-services.xml file:


Flex 2.0 syntax

In Flex 2.0, you use the destination attribute to identify which Remoting Service
destination to use. In the configuration file, you define a destination.
MXML tag:

I put some more light on this soon. Stay tuned...


Adobe Flex 2.0

Life at TIS is cool.This is the first time I have found so many fellow flash coders around me. Nothing much too say about myself.Another new city,new work place and new set of people. Just trying to cope up with everything.Missing Delhi very much,my old work station at icreon.

The only exciting thing is that I am learning Adobe Flex 2.0. Its really cool.This is the first time I am feeling like a real hardcore programmer. No timeline, no movieclip as such. At this point I can just visualize where Flash is going from the skip intro era to a real application development IDE.Flex is still in beta.Moreover, there are very few people in Indian software industry who knows how to code in Flex's earlier version 1.5 .Flex is really going to be a hit in India soon.