I want to send data(just a name for name) to my OpenErp (Odoo 9 ) through my Android application . I create a module that i inserted successfully in my Odoo Account ,tht only have the field "name" . but i have this problems in Android Studio :
cannot access XmlRpcController ,XmlRpcHttpRequestConfig !!
Button click ;
static final String TAG = "OERP";
final String url = "l";
final String db = "database";
final String username = "admin";
final String password = "123";
static final XmlRpcClient client = new XmlRpcClient();
static final XmlRpcClientConfigImpl common_config = new XmlRpcClientConfigImpl();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
click=(Button)findViewById( R.id.button);
View.OnClickListener l=new View.OnClickListener() {
@Override
public void onClick(View v) {
try{
Map emptyMap = Collections.emptyMap();
**/*first error*/** common_config.setServerURL(
new URL(String.format("%s/xmlrpc/2/common", url)));
**/*second error*/** int uid = (int) client.execute(
common_config, "authenticate", asList(
db, username, password, emptyMap));
**/*third error*/** 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", asList(
db, uid, password,
"pointage.task", "create",
asList(new HashMap() {{
put("name", "New Partner");
}})
));
} catch (MalformedURLException e){
Log.e(TAG,"/ :: "+e.getMessage(),e);
}
}
};click.setOnClickListener(l);
}
}
and this is my logcat:
Error:(60, 19) error: cannot accessXmlRpcHttpRequestConfig class file for org.apache.xmlrpc.common.XmlRpcHttpRequestConfig not found
Error:(62, 28) error: cannot access XmlRpcHttpRequestConfigImpl class file for
org.apache.xmlrpc.common.XmlRpcHttpRequestConfigImpl not foundError:(67, 34) error: cannot access XmlRpcController class file for org.apache.xmlrpc.common.XmlRpcController not found