List<List<String>> results = new ArrayList<List<String>>();
if (tupleToWebRowSet.hasNextResult())
{
// Get ResultSet.
ResultSet resultSet = tupleToWebRowSet.nextResultAsResultSet();
// Get ResultSet metadata.
ResultSetMetaData metaData = resultSet.getMetaData();
// Print column names.
int numColumns = metaData.getColumnCount();
StringBuilder columns = new StringBuilder();