【问题标题】:ODOO Web Service API is not working by using PHP code given in odoo web services APIODOO Web 服务 API 无法使用 odoo Web 服务 API 中给出的 PHP 代码工作
【发布时间】:2017-04-17 05:02:39
【问题描述】:

我正在使用以下 php 代码通过以下链接连接 odoo Web 服务 https://www.odoo.com/documentation/9.0/api_integration.html

$url = "http://188.166.242.45:8069/";
$db = "test_db";
$username = "admin";
$password = "admin";

require_once('ripcord-master/ripcord.php');
$info = ripcord::client('http://188.166.242.45:8069/')->start();
list($url, $db, $username, $password) =
  array($info['host'], $info['database'], $info['user'], $info['password']);

但这显示了以下错误。

Fatal error: Uncaught exception 'Ripcord_TransportException' with message 'Could not access http://188.166.242.43:8069/' in D:\xampp\htdocs\web_services\ripcord-master\ripcord_client.php:488 Stack trace: #0 D:\xampp\htdocs\web_services\ripcord-master\ripcord_client.php(228): Ripcord_Transport_Stream->post('http://188.166....', '<?xml version="...') #1 D:\xampp\htdocs\web_services\index.php(10): Ripcord_Client->__call('start', Array) #2 D:\xampp\htdocs\web_services\index.php(10): Ripcord_Client->start() #3 {main} thrown in D:\xampp\htdocs\web_services\ripcord-master\ripcord_client.php on line 488

我该如何解决这个问题???

【问题讨论】:

  • 你解决了吗?

标签: php openerp odoo-8 odoo-9


【解决方案1】:

好吧,链接:https://www.odoo.com/documentation/9.0/api_integration.html 显示了用于进行 Api 调用的 PHP 代码。它使用 ripcord xmlrpc Php 库。该示例将 URL 显示为:https://demo.odoo.com/start。您的网址不包含 /start。尝试使用此网址:http://188.166.242.45:8069/start。您是否在端口 8069 上安装了 Odoo?

示例下方的注释说 ripcord 库需要 phpxmlrpc 和 openssl 扩展。它还需要 https 作为 api url

【讨论】:

    猜你喜欢
    • 2018-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-04-02
    • 2014-12-28
    • 1970-01-01
    相关资源
    最近更新 更多