One is to get a full XML description of the whole category schema, and the other is a recursive style using the methods defined in the Asset Manager Web service API.
Once you hear that description, it's easy to write the code, in fact. This is a place where the recursive version of it is much easier to think about than the iterative one.