The ActionScript client library’s RestClientHelper class includes the following helper methods, which convert arrays, iLists, and Objects to MultiValue objects:

public static function convertArrayToMultivalue(pValue:Array, pMultiValueType:String,
 pComponentType:String, pFormat:String, pSession:RestSession):String

public static function convertIListToMultivalue(pValue:IList, pMultiValueType:String,
 pComponentType:String, pFormat:String, pSession:RestSession):String

public static function convertObjectToMultivalue(pValue:Object, pMultiValueType:String,
 pKeyType:String, pValueType:String, pFormat:String, pSession:RestSession):String

The following table describes the arguments for each of these methods.




The absolute path of a Java class, such as java.util.ArrayList. Be sure to specify a valid class name and not an interface name.


The class type of the component to instantiate for each element in the multivalued type. For example, an array of integers in ActionScript could be converted to an ArrayList of java.lang.Integer objects.


The server’s input format type. This can be retrieved from the session object’s inputFormat property..



ActionScript objects act as associative arrays (similar to java Maps), the convertObjectToMultivalue() method takes a key type and value type.

These arguments are similar to pComponentType and are absolute names of Java classes to use for the key and value objects in the Java Map.

Similar to the Java client library, passing arguments to methods is generally straightforward. For primitive types, just add them to the pArguments array.

var result:RestResult = RestComponentHelper.executeMethod("/some/Component", "aMethod", [1,2,3,4.4,5.5,true,'a',0xa], null, session, handleResult, handleFault)

To pass a reference to a repository item, use the format

<repository path:item descriptor name:item id>

For example:

var result:RestResultRestComponentHelper.executeMethod("/some/Component",
"aMethod", ["/atg/commerce/catalog/ProductCatalog:product:prod12345"], null,
session, handleResult, handleFault)

To pass a reference to a Nucleus component, pass the Nucleus component path. For example:

var result:RestResultRestComponentHelper.executeMethod("/some/Component",
"aMethod", ["/atg/dynamo/Configuration"], null, session, handleResult,

The following example is a call to a method which takes a repository item array and a GenericService array.

var result:RestResultRestComponentHelper.executeMethod("/some/Component",
 null, session, handleResult, handleFault)

As mentioned above, arrays, ILists, and Objects must be converted before being passed to the server. The following example demonstrate passing an array using the helper methods in the RestClientUtils class.

var arrayCollection:ArrayCollection = new ArrayCollection(["abc","def"]);
var result:RestResultRestComponentHelper.executeMethod("/some/Component",
"java.util.ArrayList", "java.lang.String", RestConstants.JSON, session)],
 null, session, handleResult, handleFault);

The following example, which calls executeMethod(), produces the same result as the previous example:

var result:RestResultRestComponentHelper.executeMethod("/some/Component",
"aMethod", ["java.util.ArrayList:java.lang.String:[\"abc\",\"def\"]"], null,
session, handleResult, handleFault)

The following examples use the helper methods in the RestClientUtils class.

var result:RestResultRestComponentHelper.executeMethod("/some/Component", "aMethod",
"java.util.HashSet", "java.lang.String", RestConstants.JSON, session)],
 null, session, handleResult, handleFault)

var obj:Object = new Object();
obj["abc"] = 123;
obj["def"] = 456;

var result:RestResultRestComponentHelper.executeMethod("/some/Component",
 [RestClientUtils.convertObjectToMultivalue(obj, "java.util.HashMap",
"java.lang.String", "java.lang.Integer", RestConstants.JSON, session)],
 null, session, handleResult, handleFault)
loading table of contents...