Pular para o conteúdo
Odoo Menu
  • Entrar
  • Experimente grátis
  • Aplicativos
    Finanças
    • Financeiro
    • Faturamento
    • Despesas
    • Planilhas (BI)
    • Documentos
    • Assinar Documentos
    Vendas
    • CRM
    • Vendas
    • PDV Loja
    • PDV Restaurantes
    • Assinaturas
    • Locação
    Websites
    • Criador de Sites
    • e-Commerce
    • Blog
    • Fórum
    • Chat ao Vivo
    • e-Learning
    Cadeia de mantimentos
    • Inventário
    • Fabricação
    • PLM - Ciclo de Vida do Produto
    • Compras
    • Manutenção
    • Qualidade
    Recursos Humanos
    • Funcionários
    • Recrutamento
    • Folgas
    • Avaliações
    • Indicações
    • Frota
    Marketing
    • Redes Sociais
    • Marketing por E-mail
    • Marketing por SMS
    • Eventos
    • Automação de Marketing
    • Pesquisas
    Serviços
    • Projeto
    • Planilhas de Horas
    • Serviço de Campo
    • Central de Ajuda
    • Planejamento
    • Compromissos
    Produtividade
    • Mensagens
    • Aprovações
    • Internet das Coisas
    • VoIP
    • Conhecimento
    • WhatsApp
    Aplicativos de terceiros Odoo Studio Plataforma Odoo Cloud
  • Setores
    Varejo
    • Loja de livros
    • Loja de roupas
    • Loja de móveis
    • Mercearia
    • Loja de ferramentas
    • Loja de brinquedos
    Comida e hospitalidade
    • Bar e Pub
    • Restaurante
    • Fast Food
    • Hospedagem
    • Distribuidor de bebidas
    • Hotel
    Imóveis
    • Imobiliária
    • Escritório de arquitetura
    • Construção
    • Administração de propriedades
    • Jardinagem
    • Associação de proprietários de imóveis
    Consultoria
    • Escritório de Contabilidade
    • Parceiro Odoo
    • Agência de marketing
    • Escritório de advocacia
    • Aquisição de talentos
    • Auditoria e Certificação
    Fabricação
    • Têxtil
    • Metal
    • Móveis
    • Alimentação
    • Cervejaria
    • Presentes corporativos
    Saúde e Boa forma
    • Clube esportivo
    • Loja de óculos
    • Academia
    • Profissionais de bem-estar
    • Farmácia
    • Salão de cabeleireiro
    Comércio
    • Handyman
    • Hardware e Suporte de TI
    • Sistemas de energia solar
    • Sapataria
    • Serviços de limpeza
    • Serviços de climatização
    Outros
    • Organização sem fins lucrativos
    • Agência Ambiental
    • Aluguel de outdoors
    • Fotografia
    • Aluguel de bicicletas
    • Revendedor de software
    Navegar por todos os setores
  • Comunidade
    Aprenda
    • Tutoriais
    • Documentação
    • Certificações
    • Treinamento
    • Blog
    • Podcast
    Empodere a Educação
    • Programa de educação
    • Scale Up! Jogo de Negócios
    • Visite a Odoo
    Obtenha o Software
    • Baixar
    • Comparar edições
    • Releases
    Colaborar
    • Github
    • Fórum
    • Eventos
    • Traduções
    • Torne-se um parceiro
    • Serviços para parceiros
    • Cadastre seu escritório contábil
    Obtenha os serviços
    • Encontre um parceiro
    • Encontre um Contador
    • Conheça um consultor
    • Serviços de Implementação
    • Referências de Clientes
    • Suporte
    • Upgrades
    Github YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Faça uma demonstração
  • Preços
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Financeiro
  • Inventário
  • PoS
  • Projeto
  • MRP
All apps
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
É necessário estar registrado para interagir com a comunidade.
Todas as publicações Pessoas Emblemas
Marcadores (Ver tudo)
odoo accounting v14 pos v15
Sobre este fórum
Ajuda

Why does my XMLRPC path return a 404 error?

Inscrever

Seja notificado quando houver atividade nesta publicação

Esta pergunta foi sinalizada
v7xmlrpc
1 Responder
15812 Visualizações
Avatar
Daniel DeLoretta

I am using OpenERP version 7 (default install) on my own server (CentOS 6) however I cannot connect via XMLRPC.

Please note: I lack sufficient priviliges to post "links" - where you see [http://] you can assume it is http://

wget [http://]my.server:8069/xmlrpc/
root@srv2578a [~]# wget [http ://]my.server:8069/xmlrpc/
--2013-04-24 11:27:49--  [http://]my.server:8069/xmlrpc/
Connecting to my.server:8069... connected.
HTTP request sent, awaiting response... 404 NOT FOUND
2013-04-24 11:27:49 ERROR 404: NOT FOUND.

I have checked in my openerp-server.conf file and the following xmlrpc related items are (in this order):

#i believe the blank interface is listening on all IPs?
xmlrpc_interface =
xmlrpc_port = 8069
xmlrpc = True

I can connect to the website and log in and perform tasks just fine. I wish to automate some things using the XMLRPC feature and PHP.

I am using the following to attempt to connect via XMLRPC (it should return my userid):

<?php

include_once("xmlrpc-2.2.2/lib/xmlrpc.inc"); 
class OpenERPXmlrpc {

    private $user, $password, $database, $services, $client, $res, $msg, $id;

    function __construct($usr, $pass, $db, $server) {

        $this->user = $usr;
        $this->password = $pass;
        $this->database = $db;
        $this->services = $server;

        $this->client = new xmlrpc_client($this->services.'common'); 
        $this->msg = new xmlrpcmsg('login');
        $this->msg->addParam(new xmlrpcval($this->database, "string"));
        $this->msg->addParam(new xmlrpcval($this->user, "string"));
        $this->msg->addParam(new xmlrpcval($this->password, "string"));
        $this->res =  &$this->client->send($this->msg);

        if(!$this->res->faultCode()){
            $this->id = $this->res->value()->scalarval();
        }
        else {
            echo "Unable to login ".$this->res->faultString();
            exit;
        }
    }

    function read($post = null) {

        $this->client = new xmlrpc_client($this->services.'object');
        if(empty($post)) {
            $ids_read = array(new xmlrpcval('1', 'int'), new xmlrpcval('2', 'int'));
            $key = array(new xmlrpcval('id','integer') , new xmlrpcval('name', 'string'));
            $this->msg = new xmlrpcmsg('execute');
            $this->msg->addParam(new xmlrpcval($this->database, "string"));
            $this->msg->addParam(new xmlrpcval(1, "int"));
            $this->msg->addParam(new xmlrpcval($this->password, "string"));
            $this->msg->addParam(new xmlrpcval("res.partner","string"));
            $this->msg->addParam(new xmlrpcval("read", "string"));
            $this->msg->addParam(new xmlrpcval($ids_read, "array"));
            $this->msg->addParam(new xmlrpcval($key, "array"));

            $this->res = &$this->client->send($this->msg);
            if(!$this->res->faultCode()) {
                $read_html = '<table width="20%" border="0" cellpadding="4" cellspacing="4" align="center">
                        <tr>
                           <th>Id</th>
                           <th>Name</th>
                        </tr>
                     ';

                $scalval = $this->res->value()->scalarval();
                foreach ($scalval as $keys => $values) {
                    $value = $values->scalarval();
                    $read_html .= '
                     <tr>
                        <td>'.$value['id']->scalarval().'</td>
                        <td>'.$value['name']->scalarval().'</td>
                     </tr>
                     <tr><td colspan="2"></td></tr>';
                }
                $read_html .= '</table>';
                return $read_html;
            }
            else {
                return "Not read recode from partner table <br />".$this->res->faultString();
            }
        }
    }

}

$cnt = new OpenERPXmlrpc('user.name', 'password', 'DATABASE01', '[http://]my.server:8069/xmlrpc/');

echo $cnt->read();

// outputis this:
// Unable to login Connect error: Connection timed out (110)
?>

Has anyone else encountered this?

Anybody care to share some thoughts on this issue?

0
Avatar
Cancelar
Avatar
Daniel DeLoretta
Autor Melhor resposta

Oh! What a simple fix. It would appear you have to open the ports on both the client and the server machines so they can talk.

I simply added port 8069 to the in/out allow chain in iptables.

0
Avatar
Cancelar
Está gostando da discussão? Não fique apenas lendo, participe!

Crie uma conta hoje mesmo para aproveitar os recursos exclusivos e interagir com nossa incrível comunidade!

Inscreva-se
Publicações relacionadas Respostas Visualizações Atividade
list res.partner with XMLRPC
v7 xmlrpc
Avatar
Avatar
Avatar
2
mar. 15
13785
Is /xmlrpc not included in OpenERP v7 apt repo?
v7 xmlrpc
Avatar
Avatar
1
mar. 15
6122
Via XMLRPC: Can I check if there is an user logged into OpenERP Web Interface at the current web browser?
v7 xmlrpc
Avatar
0
mar. 15
4793
XMLRPC: How to fetch a list of all ids that belongs to a given model?
v7 search xmlrpc
Avatar
Avatar
Avatar
2
mar. 15
18845
How to add a "Delete" button on the popup form? Resolvido
v7
Avatar
Avatar
1
out. 25
5525
Comunidade
  • Tutoriais
  • Documentação
  • Fórum
Open Source
  • Baixar
  • Github
  • Runbot
  • Traduções
Serviços
  • Odoo.sh Hosting
  • Suporte
  • Upgrade
  • Desenvolvimentos personalizados
  • Educação
  • Encontre um Contador
  • Encontre um parceiro
  • Torne-se um parceiro
Sobre nós
  • Nossa empresa
  • Ativos da marca
  • Contato
  • Empregos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Legal • Privacidade
  • Segurança
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo é um conjunto de aplicativos de negócios em código aberto que cobre todas as necessidades de sua empresa: CRM, comércio eletrônico, contabilidade, estoque, ponto de venda, gerenciamento de projetos, etc.

A proposta de valor exclusiva Odoo é ser, ao mesmo tempo, muito fácil de usar e totalmente integrado.

Site feito com

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now