|
Hi,
I’m trying to test out the api functionality on my new 1.1.6 install. My installation has all of the recommended items, according to the Magento docs, as well as soap installed (I’ve seen other posts where that was the issue).
I have a very simple script that is trying to connect to the store and display a list of the products (of which there is exactly 1).
Here’s my sample code:
$proxy = new SoapClient('http://dev5.tridian.com/magentostore/magento/api/?wsdl');
$sessionId = $proxy->login('api_user', 'xxxxxx');
$products = $proxy->call($sessionId, 'product.list'); var_dump($products);
Here’s what shows up in the error log:
[Fri Sep 19 13:00:02 2008] [error] [client 24.199.0.38] PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in 'http://dev5.tridian.com/magentostore/magento/api/?wsdl' in /www/sites/dev5.tridian.com/files/html/api_test.php on line 15 [Fri Sep 19 13:00:02 2008] [error] [client 24.199.0.38] PHP Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in 'http://dev5.tridian.com/magentostore/magento/api/?wsdl' in /www/sites/dev5.tridian.com/files/html/api_test.php:15 [Fri Sep 19 13:00:02 2008] [error] [client 24.199.0.38] Stack trace: [Fri Sep 19 13:00:02 2008] [error] [client 24.199.0.38] #0 /www/sites/dev5.tridian.com/files/html/api_test.php(15): SoapClient->SoapClient('http://dev5.tri...') [Fri Sep 19 13:00:02 2008] [error] [client 24.199.0.38] #1 {main} [Fri Sep 19 13:00:02 2008] [error] [client 24.199.0.38] thrown in /www/sites/dev5.tridian.com/files/html/api_test.php on line 15
Can anyone help me understand what this means? It seems like it’s tripping over something in creating the wsdl.
Lastly, if I try to hit the wsdl url directly (http://dev5.tridian.com/magentostore/magento/api/?wsdl), I get the following stack trace:
I’ve also tried the other variations of the soap url as posted by others in the forum (using index.php, adding default folder, etc)
Warning: SimpleXMLElement::addAttribute() [function.SimpleXMLElement-addAttribute]: Attribute name and value are required in /www/sites/dev5.tridian.com/files/html/magentostore/magento/lib/Varien/Simplexml/Element.php on line 387 Trace: #0 [internal function]: mageCoreErrorHandler(2, 'SimpleXMLElemen...', '/www/sites/dev5...', 387, Array) #1 /www/sites/dev5.tridian.com/files/html/magentostore/magento/lib/Varien/Simplexml/Element.php(387): SimpleXMLElement->addAttribute('descr', '') #2 /www/sites/dev5.tridian.com/files/html/magentostore/magento/lib/Varien/Simplexml/Element.php(409): Varien_Simplexml_Element->extendChild(Object(Mage_Core_Model_Config_Element), true) #3 /www/sites/dev5.tridian.com/files/html/magentostore/magento/lib/Varien/Simplexml/Element.php(409): Varien_Simplexml_Element->extendChild(Object(Mage_Core_Model_Config_Element), true) #4 /www/sites/dev5.tridian.com/files/html/magentostore/magento/lib/Varien/Simplexml/Element.php(409): Varien_Simplexml_Element->extendChild(Object(Mage_Core_Model_Config_Element), true) #5 /www/sites/dev5.tridian.com/files/html/magentostore/magento/lib/Varien/Simplexml/Element.php(409): Varien_Simplexml_Element->extendChild(Object(Mage_Core_Model_Config_Element), true) #6 /www/sites/dev5.tridian.com/files/html/magentostore/magento/lib/Varien/Simplexml/Element.php(342): Varien_Simplexml_Element->extendChild(Object(Mage_Core_Model_Config_Element), true) #7 /www/sites/dev5.tridian.com/files/html/magentostore/magento/lib/Varien/Simplexml/Config.php(592): Varien_Simplexml_Element->extend(Object(Mage_Core_Model_Config_Element), true) #8 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/code/core/Mage/Api/Model/Config.php(78): Varien_Simplexml_Config->extend(Object(Mage_Core_Model_Config_Base), true) #9 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/code/core/Mage/Api/Model/Config.php(49): Mage_Api_Model_Config->_construct() #10 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/code/core/Mage/Core/Model/Config.php(721): Mage_Api_Model_Config->__construct(Array) #11 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/Mage.php(314): Mage_Core_Model_Config->getModelInstance('api/config', Array) #12 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/Mage.php(328): Mage::getModel('api/config', Array) #13 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/code/core/Mage/Api/Model/Server.php(45): Mage::getSingleton('api/config') #14 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/code/core/Mage/Api/controllers/IndexController.php(41): Mage_Api_Model_Server->init(Object(Mage_Api_IndexController), 'soap') #15 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(349): Mage_Api_IndexController->indexAction() #16 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(163): Mage_Core_Controller_Varien_Action->dispatch('index') #17 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(174): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http)) #18 /www/sites/dev5.tridian.com/files/html/magentostore/magento/app/Mage.php(447): Mage_Core_Controller_Varien_Front->dispatch() #19 /www/sites/dev5.tridian.com/files/html/magentostore/magento/index.php(52): Mage::run() #20 {main}
Is anyone else having the same issue? Anyone know what the problem here is?
Thanks so much.
|