Odoo Help


I am trying to insert Data in my Odoo 9 using web Service Api (XML Rpc)and I get these erreur :Can't access : XmlRpcHttpRequestConfig ,XmlRpcHttpRequestConfigImpl and XmlRpcHttpRequestController

on 3/23/16, 6:52 AM 830 views

Here is my Code : 

public class OpenERP extends  AsyncTask<Context, Void, Void>{

final String TAG = "ERP";
 final String url = "";
 final String db = "Rabii";
 final String username = "admin";
 final String password = "123";
 String a[] = new String[]{db, username, password};
 List<String> list = new ArrayList<String>(Arrays.asList("", "", "", ""));
 Map emptymap = emptyMap(); List<String> list1 = new ArrayList<String>(Arrays.asList("", "", "", "", ""));
protected Void doInBackground(Context... params) {
 try {
 final XmlRpcClient client = new XmlRpcClient();
 final XmlRpcClientConfigImpl common_config = new XmlRpcClientConfigImpl();
 common_config.setServerURL(new URL(String.format("%s/xmlrpc/2/common", url)));

 int uid = (int)client.execute( common_config, "authenticate", asList(db, username, password, emptyMap()));
 final XmlRpcClient models = new XmlRpcClient() { { setConfig(new XmlRpcClientConfigImpl() {{ setServerURL(new URL(String.format("%s/xmlrpc/2/object", url))); }});
 } }; final Integer id = (Integer) models.execute("execute_kw", list2( db, uid, password,"pointage.task", "create",
 asList(new HashMap() {{ put("name", "New Partner"); }}) )); }
 catch (MalformedURLException e) { Log.e(TAG, "URL exception: " + e.getMessage()); }
return null ; }
 private List asList(String db, String username, String password, Map<Object, Object> objectObjectMap)
 { return null; }}

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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.


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

1 follower(s)


Asked: 3/23/16, 6:52 AM
Seen: 830 times
Last updated: 3/23/16, 8:04 AM