Archive for September, 2008

New server for Flex 3 ASP.NET examples

This may not be as exciting for you as it is for us, but we just deployed, a new server that runs the server code for our ASP.NET examples on the Flex 3 Getting Started Experience. In addition to deploying the Exchanging Data and Working with Data server-side code, we updated the importable zip files on

To try this out:

  1. Download the Exchanging Data and Working with Data zip files.
  2. Import them into Flex Builder using File>Import>Flex Project.
  3. Open the ExchangeData_PlainText.mxml and ExchangeData_XML.mxml applications (exchanging data project) and the CRUD.mxml application (working with data project).
  4. Run the applications and review the asp directories to see the ASP.NET server-side code.

If you get a chance, please try this out and let me if you have any feedback.


New Community Help blog

There’s a new Community Help blog at Adobe. It’s a good place to get news about new Community Help features, as well as provide feedback about stuff you like, dislike, or absolutely despise.

You can see the blog here:

Calling remoting destinations from Flash or Java applications

The legacy NetConnection API of Flash Player provides a way to call remoting destinations from a standard (non-Flex) Flash application or from ActionScript in a Flex application if desired. The new Java AMF Client in BlazeDS gives you a Java API patterned on the NetConnection API but for calling remoting destinations from a Java application. You can use either of these APIs with BlazeDS, LiveCycle Data Services, or third-party remoting implementations.

Call a remoting destination from a Flash application

You can use the Flash Player API to call a BlazeDS remoting destination from a Flash application. You use the NetConnection.connection() method to connect to a destination and the method to call the service.
The following MXML code example shows this legacy way of making remoting object calls with NetConnection instead of RemoteObject:

<?xml version="1.0"?>
<mx:Application xmlns:mx="" width="100%" height="100%"

<mx:Panel id="mainPanel" height="100%" width="100%">
<mx:Label text="Enter a text for the server to echo"/>
<mx:TextInput id="ti" text="Hello World!"/>
<mx:Button label="Send" click="echo()"/>
<mx:Button label="Clear" click='ta.text = ""'/>
<mx:TextArea id="ta" width="100%" height="100%"/>
private var nc:NetConnection

private function creationCompleteHandler():void
nc = new NetConnection();
nc.objectEncoding = ObjectEncoding.AMF0;
nc.connect("http://[server]:[port]/yourapp/messagebroker/amf" );
private function echo():void
{ "remoting_AMF.echo", new Responder( resultHandler, faultHandler ), ti.text );
private function resultHandler(result:Object):void
ta.text += "Server responded: "+ result + "\n";
private function faultHandler(fault:Object):void
ta.text += "Received fault: " + fault + "\n";

Call a remoting destination from a Java application

The Java AMF Client is new Java client API in the BlazeDS flex-messaging-core.jar file that makes it simple to work with remoting destinations from a Java application. The Java AMF Client is similar to the Flash Player API, but uses typical Java coding style rather than ActionScript coding style.

The Java AMF Client classes are in the* package in the flex-messaging-amf.jar file. The primary class of the Java AMF Client is the AMFConnection class. You connect to remote URLs with the AMFConnection.connect() method and call the service with the method. You catch ClientStatusException and ServerStatusException exceptions when there are errors.
Here’s a simple example of how you can use AMFConnection to call a Remoting Service destination from a method in a Java class:

public void callRemoting()
// Create the AMF connection.
AMFConnection amfConnection = new AMFConnection();

// Connect to the remote url.
String url = "http://[server]:[port]/yourapp/messagebroker/amf";
catch (ClientStatusException cse)

// Make a remoting call and retrieve the result.
Object result ="remoting_AMF.echo", "echo me1");
catch (ClientStatusException cse)
catch (ServerStatusException sse)
// Close the connection.

The Java AMF Client automatically handles cookies similarly to the way in which web browsers do, so there is no need for custom cookie handling.

Using BlazeDS with Maven

If you are interested in getting started with BlazeDS, particularly with Maven, Espen Dall√łkken has a great blog article and demo application:



BlazeDS doc updated

Updated LiveDocs HTML and PDF versions of the BlazeDS Developer Guide is available at:
This revised Developer Guide contains all of the content from the new LiveCycle Data Services 2.6 Developer Guide that applies to BlazeDS.

Much of the documentation has been revised and reorganized, and there are completely new sections on:
Getting Started
– Introduction
– Building and deploying

– General architecture
– Channels and endpoints
– Managing session data