Using Tridion Core Service which method would provide me a whole object of below tree
Core service provinding me whole xml but not .net object of ProductCatalog.
The SDL Tridion Core Service will return you a IdentifiableObjectData
object when you call the client.Read()
method. You can cast this object into a CategoryData
object which will just contain the information about this Category.
There is to my knowledge no way of getting a Category object which contains the entire tree of Keywords, from the Category you would have to call:
client.GetListXml(categoryUri, new KeywordsFilterData() { IsRoot = true });
And for each of the Keywords returned you can then call:
client.GetListXml(keywordUri, new ChildKeywordsFilterData());
To get each of its children. An example of this I have displayed in my Item Selector on SDL Tridion World.
IsRoot=true
in the filter). The reason behind is that Keywords are not necessarily used as a hierarchy - they can be stored as one, but you may want to use it flat lists too. That, and the fact that originally they were flat lists only, hierarchy was added in Tridion 2009.