Listing 1

// CLASS benchmarks.flashorb.TestService
package benchmarks.flashorb;
public class TestService
{
public String echoString( String string )
{
return string;
}
public int echoInt( int integer )
{
return integer;
}
public Person echoPerson( Person person )
{
return person;
}
public Person[] echoPersonArray( Person[] person )
{
return person;
}
public String[] echoArray( String[] array )
{
return array;
}
}
// CLASS benchmarks.flashorb.Person
package benchmarks.flashorb;
public class Person
{
public String name;
public int age;
public String streetAddress;

public String city;
public String state;
public String zipCode;
}

Listing 2

#include "NetServices.as"
import mx.services.WebService;
// create Web service proxy
var service:WebService = new WebService( "http://localhost:
8080/axis/services/TestService?wsdl" );
// create flash remoting proxy
var gwConnection = NetServices.createGatewayConnection(
"http://localhost:8081/flashorb" );
var frService = gwConnection.getService(
"benchmarks.flashorb.TestService", this );
stop();
function echoInt_Result( result )
{
_global.echoIntFRCalls++;
}
function echoString_Result( result )
{
_global.echoStringFRCalls++;
}
function echoPerson_Result( result )
{
_global.echoPersonFRCalls++;
}
function echoPersonArray_Result( result )
{
_global.echoPersonArrayFRCalls++;
}
function echoArray_Result( result )
{
_global.echoStringArrayFRCalls++;