I am trying to implement Magento 2 Odoo connector by using Zend XmlRpc Client.
$httpClient = new \Zend\Http\Client();
$oxClient = new \Zend\XmlRpc\Client('http://192.168.2.114:8069/',$httpClient);
But it throwing an error like Class 'Zend\XmlRpc\Client' not found
Does magento 2 supports Zend XmlRpc Client?
Khoa Truong
32.5k11 gold badges91 silver badges159 bronze badges
asked Mar 29, 2017 at 13:02
Renjith R
2731 gold badge2 silver badges11 bronze badges
1 Answer 1
The Zend 1 standard: new \Zend_Http_Client(); and new \Zend_XmlRpc_Client()
See more examples about Zend_Http_Client under: vendor/magento/zendframework1/library/Zend/Service
answered Mar 29, 2017 at 13:05
Khoa Truong
32.5k11 gold badges91 silver badges159 bronze badges
-
Thanx for your quick repy.I can load http client class but not xmlrpc class for magento 2. new Zend_XmlRpc_Client() it throws same error.Renjith R– Renjith R2017年03月29日 13:07:53 +00:00Commented Mar 29, 2017 at 13:07
-
Should take a look some samples:
vendor/magento/zendframework1/library/Zend/OpenId/Consumer.php. Search through your magento with the keywordZend_Http_Client(). You can see more.Khoa Truong– Khoa Truong2017年03月29日 13:12:29 +00:00Commented Mar 29, 2017 at 13:12 -
I am trying to call this function under a custom module in app/code folder.So can you explain how can i send xmlrpc request to odoo by using Zend_Http_Client() method?Renjith R– Renjith R2017年03月29日 13:17:10 +00:00Commented Mar 29, 2017 at 13:17
-
I'm not familiar with Odoo. You should open new question. Additionally, you can see some example module:
vendor/magento/zendframework1/library/Zend/Service/Amazon.phpKhoa Truong– Khoa Truong2017年03月29日 13:21:42 +00:00Commented Mar 29, 2017 at 13:21 -
Sorry @khoa ,it still throws error ` Uncaught Error: Class 'Module\Name\Odoo\Api\Def\Zend_Http_Client'` not found.Renjith R– Renjith R2017年03月29日 13:28:44 +00:00Commented Mar 29, 2017 at 13:28
default