我無法在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
)
最後,請確保始終引用this article,因爲您可以在此處使用幾乎所有Web Service API方法。
希望它有幫助。
爲了獲得更好的結果,我將網頁Magento Web服務更新爲「WS-I合規性」。 但之後我開始得到以下錯誤,任何人有想法? SOAP-ENV: SOAP-ENV:服務器過程登錄不存在 faulttring> SOAP-ENV:Fault> SOAP-ENV:Body> SOAP-ENV:Envelope> –
objectivecdeveloper
2012-03-20 11:49:57