The solution for the above issue is:
The languageId of english is 1 for store1 and 5 for store2.
so we need to call CategoryIf[] categories = engine.getCategoryTree(5, true); to access store2 categories/products.
we can also use CategoryIf[] categories = engine.getCategoryTree(-1, true); to access store2 with default language.
The languageId of english is 1 for store1 and 5 for store2.
so we need to call CategoryIf[] categories = engine.getCategoryTree(5, true); to access store2 categories/products.
we can also use CategoryIf[] categories = engine.getCategoryTree(-1, true); to access store2 with default language.