1

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

1 Answer 1

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
9
  • 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. Commented 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 keyword Zend_Http_Client(). You can see more. Commented 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? Commented 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.php Commented 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. Commented Mar 29, 2017 at 13:28

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.