The gradebookservice provies two methods for getting the categories,
However the Javadocs for the getCategories method says:
This method cannot be used outside of the gradebook because it returns the org.sakaiproject.tool.gradebook.Category object. If you require info on the categories from a consumer outside the gradebook, use getCategoryDefinitions(String)
The issue here is that using getCategoryDefinitions does not provide a corresponding getAssignmentList method like the Category does. And you can't use the Category method outside of the gradebook since it isn't shared.