@fatihemre; Doğru olan kodu vermiş. Sağlıklı çalışması gerek.
<?php
$n11 = new SoapClient('https://api.n11.com/ws/CategoryService.wsdl');
$category = $n11->GetTopLevelCategories(array(
'auth' => array(
'appKey' => '',
'appSecret' => ''
)
));
foreach($category->categoryList->category as $category) {
echo '<li>' . $category->id . ' - ' . $category->name . '</li>';
}