This is necessary because Velocity does not provide accessors into arrays and some of the API calls will return SoapNamedValues objects that have two matching arrays of name and value.

length(Object[] array)

Get the length of the array.

The array being examined.

Returns: The length of the array (null array will return 0).

get(Object[] array, int index)

Get the object at the specified index of the array.

The array that contains the object of interest.
The index we are pulling the object from.

Returns: The object stored at that array of null if the array is empty or position is invalid.