Get collection of test object variables

Does anyone know if there is a simple way (in a test case script) to get a collection/list/array of variables in a test object? To be more specific, I’d like to get the variables of a SOAP request.