Odoo Help

0

How to configure XMLRPC on my Open ERP server

By
Godwin AVODAGBE
on 11/12/13, 2:15 PM 1,939 views

Can someone explain me how to configure XML RPC protocol on my Open ERP server ?

I would like have a better understanding about all settings that required to obtain a right configuration in order to connect a java application using this protocol.

My openerp-server.conf seems ok : "... xmlrpc = true ... xmlrpc_port=8069 ... "

I try to run the following tutorial (provides by Open ERP), but it doesn't works ! : import java.net.URL; import org.apache.commons.lang.StringUtils; import org.apache.xmlrpc.XmlRpcException; import org.apache.xmlrpc.client.XmlRpcClient; import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; public int Connect(String host, int port, String tinydb, String login, String password) { XmlRpcClient xmlrpcLogin = new XmlRpcClient(); XmlRpcClientConfigImpl xmlrpcConfigLogin = new XmlRpcClientConfigImpl(); xmlrpcConfigLogin.setEnabledForExtensions(true); xmlrpcConfigLogin.setServerURL(new URL("http",host,port,"/xmlrpc/common")); xmlrpcLogin.setConfig(xmlrpcConfigLogin); try { //Connect params = new Object[] {tinydb,login,password}; Object id = xmlrpcLogin.execute("login", params); if (id instanceof Integer) return (Integer)id; return -1; } catch (XmlRpcException e) { logger.warn("XmlException Error while logging to OpenERP: ",e); return -2; } catch (Exception e) { logger.warn("Error while logging to OpenERP: ",e); return -3; } }

Many thanks for your help

0

Gustavo

--Gustavo--
980
| 2 1 4
Buenos Aires, Argentina
--Gustavo--

Python developer, big fan of sailing

Gustavo
On 11/12/13, 2:58 PM

Check this example:

https://doc.openerp.com/6.0/developer/6_22_XML-RPC_web_services/#id1

shows you how to connect with Java

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

0 follower(s)

Stats

Asked: 11/12/13, 2:15 PM
Seen: 1939 times
Last updated: 3/16/15, 8:10 AM