Odoo Help

0

Is XMLRPC enabled on evaluation servers?

By
Peter
on 3/9/15, 6:12 PM 3,854 views

Hi,

I'm working on integration between Odoo V8 and Drupal 7 and am having a bit of trouble making a connection to my Saas at https://cool-test1.odoo.com/

I'm using the code examples available at https://www.odoo.com/documentation/8.0/api_integration.html

When I use the URL https://demo.odoo.com/start in the $info = section I get a valid response

<?php

  $url = 'https://cool-test1.odoo.com';
  $db = 'cool-test1';
  $username = "admin";
  $password = '*****';

  require_once('ripcord-1.1/ripcord.php');
  $info = ripcord::client('https://demo.odoo.com/start')->start();
  list($url, $db, $username, $password) = array($info['host'], $info['database'], $info['user'], $info['password']);

  $common = ripcord::client("$url/xmlrpc/common");
  print_r($common->version());

  $uid = $common->authenticate($db, $username, $password, array());

?>

When I change $info = ripcord::client('https://demo.odoo.com/start')->start() to equal my saas server e.g. $info = ripcord::client('https://cool-test1.odoo.com/start')->start(); I get the below error:

Fatal error: Uncaught exception 'Ripcord_TransportException' with message 'Could not access https://cool-test1.odoo.com/start' in /usr/local/nginx/html/xmlrpc/ripcord-1.1/ripcord_client.php:488 Stack trace: #0 /usr/local/nginx/html/xmlrpc/ripcord-1.1/ripcord_client.php(228): Ripcord_Transport_Stream->post('https://cool-te...', '__call('start', Array) #2 /usr/local/nginx/html/xmlrpc/test.php(9): Ripcord_Client->start() #3 {main} thrown in /usr/local/nginx/html/xmlrpc/ripcord-1.1/ripcord_client.php on line 488

I have noticed that when you visit https://demo.odoo.com/start in a browser you get an XMLRPC error about the method, when you visit my Saas https://cool-test1.odoo.com/start you just get a 404.

Is there something I need to enable on my Saas somewhere? I followed the instructions here https://www.odoo.com/forum/help-1/question/is-the-xml-rpc-api-available-on-openerp-online-915 and enabled a password on my admin user which I'm using in my test code.

Any help would be much appreciated.

Thanks,

 

 

 

 

0
Pakiza Rana
On 10/27/17, 6:05 AM

 My code is working fine with  php5 on live server.  Same code is also working fine on my local server with php7. But it gives same error on php7 on another live server. I think it is some server configuration issue not sure. Here is my code.

$url = 'https://demo.odoo.com'; 
$db = 'demo';
$username = 'user_name';
$password = 'password';
$common = ripcord::client("$url/xmlrpc/2/common");
$models = ripcord::client("$url/xmlrpc/2/object");
$common->version();
$uid = $common->authenticate($db, $username, $password, array());

try this code. It may help others.

0
IGAM Muliarsa
On 4/13/15, 10:07 AM

replace your URL to this https://www.odoo.com/start/xmlrpc

use your odoo account & password (when your register to odoo.com) to login.

for local URL will be like this http://localhost:8069 (without /start/xmlrpc).

you can try to use Java with this solution from this question

https://www.odoo.com/forum/help-1/question/how-to-access-odoo-8-using-java-xmlrpc-83836

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 3/9/15, 6:12 PM
Seen: 3854 times
Last updated: 10/27/17, 6:05 AM