I am using Soap v2 api of magento 1.9.2. I am trying to get catalogCategoryTree response in xml but I am getting another format every time. I tried to add header below the starting line of php script, but after adding header I did not receive any response. Help me to resolve this issue.

  • can you show your code ? Commented Jul 6, 2016 at 7:29

1 Answer 1


just check weather your code is properly written without error. below is my code and which is working fine

$client = new SoapClient('http://yourmagentohost.com/index.php/api/v2_soap?wsdl=1');
$session = $client->login('yourapiusername','yourapipassword');
$result = $client->catalogCategoryTree($session,5); // replace 5 with category id
echo "<pre>"; print_r($result);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.