Configuring Flex Builder to work with WebORB for PHP

The instructions below will guide you through the process of creating and running a remoting-enabled Flex application using Flex Builder 3. At the end of the walkthrough you will have a Flex application communicating with a PHP object exposed through WebORB.

Run Flex Builder 3 and select File -> New -> Flex Project.  The dialog window shown below will appear. Enter "SampleFlexToDotNetProject" as the project name. Make sure to select "PHP" as the Application server type. Make other selections as shown below and click "Next >".

The next step is very important as it establishes the configuration paths. For the simplicity of instructions, assume WebORB is installed in the c:\dev\WeborbPHP\ folder. The WeborbPHP folder is also mapped as a virtual directory in the webserver. There are two paths to specify in the next step: Web root and Root URL:

Web root - this is a directory that contains an installation of WebORB.
Root URL - this is a URL corresponding to the "Web root" directory.

Click "Finish" to continue. Flex Builder creates a default (blank) Flex application.

Right click the project node in the "Flex Navigator" panel and open Properties. Select "Flex Compiler" and enter the following parameter into the "Additional compiler arguments" as shown in the image below:

-services c:\[WEBORB_PATH]\Weborb\web-inf\flex\services-config.xml

In case when WebORB is installed in c:\dev\WeborbPHP, the path would be:

-services c:\dev\WeborbPHP\Weborb\web-inf\flex\services-config.xml