我将无法在 Objective C 代码中为您提供帮助,但我可以向您展示一些关于 PHP 的知识。您可以尝试这种类型的调用:-
$proxy = new SoapClient('http://www.iphone5case.in/mstore/api/soap/?wsdl');
$sessionId = $proxy->login('apiUser', 'apiKey');
/**
* As defined in the "Manage Stores" section of Admin panel,
* where you need to use the specific Website Code and/or Store Code
*/
$websiteCode = null;
$storeCode = 'german';
// Parent Category ID
$parentCategoryId = 2;
$firstLevel = $proxy->call($sessionId, 'category.level', array($websiteCode, $storeCode, $parentCategoryId));
现在,如果您打印此变量“ $firstLevel
”,您将从此 Web 服务 API 获得所需的输出。
此外,每当您使用 Magento SOAP API v1 时,每个参数都需要作为数组元素。在这种情况下,以下是此 API 调用“ category.level
”所需的主要参数:-
- 网站代码或 ID
- 商店查看代码或 ID
- 父类别 ID
因此,您需要创建一个数组,并将上述每个参数按顺序放置为数组元素,例如:-
array(
$websiteCode,
$storeCode,
$parentCategoryId
)
最后,请确保您始终参考这篇文章,因为您可以在这里获得几乎所有 Web Service API 方法的用法。
希望能帮助到你。