This question has been flagged
2 Replies
9702 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

Avatar
Discard
Best Answer

Also try this lib : https://github.com/DeBortoliWines/openerp-java-api

Avatar
Discard
Best Answer

Check this example:

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

shows you how to connect with Java

Avatar
Discard