(विवरण Magento 1.6.x विशिष्ट हैं, लेकिन तकनीक, नहीं तो विवरण, अन्य संस्करणों के लिए लागू किया जाना चाहिए)
मैं यह सोचते हैं रहा हूँ, अपने कोड नमूने के आधार पर, कि आप PHP ग्राहक कोड का उपयोग कर रहे किसी विधि के अस्तित्व के लिए परीक्षण करने के लिए, जिसे आप अपने सी # एप्लिकेशन से कॉल पर लागू कर सकते हैं?
मान लिया जाये कि ऐसी बात है, तो इसका मतलब है आप PHP पता है, तो आप Magento साबुन सर्वर पीएचपी स्तर पर इस डिबग करने के लिए चाहता हूँ। केवल वर्ग फ़ाइल है कि पैदा करता है कि गलती
app/code/core/Mage/Api/Model/Server/Handler/Abstract.php
या तो उस फ़ाइल के लिए अस्थायी रूप से और सीधे निम्न लॉगिंग जोड़ें, या कोई codepool ओवरराइड के लिए
app/code/local/Mage/Api/Model/Server/Handler/Abstract.php
में वर्ग फ़ाइल की एक प्रतिलिपि ड्रॉप है। निम्नलिखित अपवाद
throw new Mage_Api_Exception('resource_path_not_callable')
यह वही है कि गलती के साथ जवाबी कार्रवाई के लिए Magento साबुन सर्वर का कारण बनता है के लिए है कि वर्ग फ़ाइल में
देखो। उस फ़ाइल में चार स्थान होते हैं। प्रत्येक के ऊपर लॉगिंग कॉल जोड़ें।
Mage::Log(sprintf('Line %s in file %s',__LINE__, __FILE__));
throw new Mage_Api_Exception('resource_path_not_callable');
यह आप जानते हैं कि जो गलती आपकी समस्या, जिसमें से आप डिबग और आगे लॉग इन कर सकते खड़ी कर रहा है करने देगा। दो स्थानों से ऐसा हो सकता (फाइल में चार कुल, एक नियमित रूप से कॉल के लिए एक, बहु कॉल के लिए एक और) कर रहे हैं।
टिप्पणियों में संभावित कारणों के साथ, उपस्थिति के क्रम में।
//here magento is attempting to instantiate the "API Model" that will perform
//the work of your API call. Upon instantiation, it discovers that the model
//doesn't inherit from Mage_Api_Model_Resource_Abstract, and bails.
//This is rare for a non-custom API call, but might be caused by a class rewrite
//gone amuck, or a very hacked system
try {
$model = Mage::getModel($modelName);
if ($model instanceof Mage_Api_Model_Resource_Abstract) {
$model->setResourceConfig($resources->$resourceName);
}
} catch (Exception $e) {
Mage::Log(sprintf('Line %s in file %s',__LINE__, __FILE__));
throw new Mage_Api_Exception('resource_path_not_callable');
}
//Here Magento's been able to instantiate the $model, and is checking if the method is
//callable. If not, it bails. Again, for a standard, stock API call this shouldn't
//be happening, but could be the result of a rewrite gone wrong, or someone hacking an
//api class to make the method non accesible, or someone hacking the method mapping in api.xml
if (is_callable(array(&$model, $method))) {
if (isset($methodInfo->arguments) && ((string)$methodInfo->arguments) == 'array') {
return $model->$method((is_array($args) ? $args : array($args)));
} elseif (!is_array($args)) {
return $model->$method($args);
} else {
return call_user_func_array(array(&$model, $method), $args);
}
} else {
Mage::Log(sprintf('Line %s in file %s',__LINE__, __FILE__));
throw new Mage_Api_Exception('resource_path_not_callable');
}
चित्रित करें कि क्यों Magento एपीआई त्रुटि फेंक रहा है। यह अक्सर आपके साबुन कॉल में एक प्रकार को इंगित करता है, या आपको अपने PHP सिस्टम
कौन-सा त्रुटि का हिस्सा नहीं आप ठीक से समझ सकते हैं? क्या आप विस्तार से समझा सकते हैं? – hakre
http: // localhost/API/v2_soap /?wsdl इसे अपने ब्राउज़र में खोलें देखें कि कैटलॉग प्रोडक्टक्रेट –
जैसी कोई विधि है या नहीं, मुझे पता है कि मुझे यह तरीका नहीं मिल रहा है ... लेकिन मैं इसे xml में देख सकता हूं ... मैं इसे हल करने के लिए कैसे कर सकता हूं? – Ste