Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>If you are able to authentication that means you have working XMLRPC connection, now in case of authentication the OpenERP Services you will be using is common service so you will have client object which will be proxy to <code>http://host:posrt/xmlrpc/common</code> that is perfectly right.</p> <p>But if you want to do any operation on any of the OE Model then for that OE Provides Separate services that is <code>OBJECT</code> service so in that case your <em>client</em> object must be proxy to <code>http://host:port/xmlrpc/object</code> and then you can call execute method on it, you can see we do not have execute method implemented for the common service on link <a href="http://bazaar.launchpad.net/~openerp/openobject-server/trunk/view/head:/openerp/service/web_services.py#L379" rel="nofollow">http://bazaar.launchpad.net/~openerp/openobject-server/trunk/view/head:/openerp/service/web_services.py#L379</a></p> <p>For more you can see <a href="http://doc.openerp.com/v6.0/developer/6_22_XML-RPC_web_services/index.html#id1" rel="nofollow">OE and JAVA</a> </p> <h2>I have Prepared Some scartch code you try in case</h2> <pre><code>package com.xmlrpc.client; import java.net.URL; import java.util.HashMap; import java.util.Vector; import org.apache.xmlrpc.client.XmlRpcClient; import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; public class Create { public static void main(String args[]) throws Exception { Vector params1 = new Vector(); params1.addElement("openerpdb"); params1.addElement("admin"); params1.addElement("admin"); XmlRpcClient xmlrpcLogin = new XmlRpcClient(); XmlRpcClientConfigImpl xmlrpcConfigLogin = new XmlRpcClientConfigImpl(); xmlrpcConfigLogin.setEnabledForExtensions(true); xmlrpcConfigLogin.setServerURL(new URL("http", "localhost", 8069, "/xmlrpc/common")); xmlrpcLogin.setConfig(xmlrpcConfigLogin); Object id = xmlrpcLogin.execute("login", params1); System.out.println("Login Id : " + id.toString()); System.out.println("------------------------"); XmlRpcClient client = new XmlRpcClient(); XmlRpcClientConfigImpl clientConfig = new XmlRpcClientConfigImpl(); clientConfig.setEnabledForExtensions(true); clientConfig.setServerURL(new URL("http", "localhost", 8069, "/xmlrpc/object")); client.setConfig(clientConfig); HashMap&lt;Object, Object&gt; params = new HashMap&lt;Object, Object&gt;(); params.put("street", "Edamon3"); params.put("partner_id", "24"); params.put("city", "Punalur3"); params.put("name", "ShameerHabeeb3"); Vector&lt;Object&gt; arg = new Vector&lt;Object&gt;(); arg.add("openerpdb"); arg.add(1); arg.add("admin"); arg.add("res.partner.address"); arg.add("create"); arg.add(params); Object ret_id = client.execute("execute", arg); System.out.println("Created new partner address with id :" + ret_id.toString()); } </code></pre> <p>}</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload