user3664724
user3664724

Reputation: 357

OpenERP Android App connection?

i am new to android environment i have installed eclipse and android developer tool.

my openerp application is running and i coded in "MainActivity.java" in "On create" method that is,

import java.net.MalformedURLException;
import java.net.URL;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.view.Menu;
import android.view.MenuItem;
import org.apache.xmlrpc.client.*;
import org.apache.xmlrpc.client.XmlRpcClient;


  protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        OpenErpConnect connection=null;
        try {
          URL loginUrl=new URL("http","192.xxx.x.xx",xxxx,"/xmlrpc/common");
          XmlRpcClient client=new  XmlRpcClient();
          Integer id=(Integer)client.call("login","new_db","admin","123456");
          connection=new OpenErpConnect(server,port,db,user,pass,id);
        }
       catch (  XMLRPCException e) {
          Log.d(CONNECTOR_NAME,e.toString());
        }
      catch (  MalformedURLException e) {
          Log.d(CONNECTOR_NAME,e.toString());
        }
      catch (  ClassCastException e) {
          Log.d(CONNECTOR_NAME,e.toString());
        }
        return connection;
    } 

i am getting error in line "Integer id=(Integer)client.call("login","new_db","admin","123456");"

Errror is,

The type org.apache.xmlrpc.common.XmlRpcController cannot be resolved. It is indirectly referenced from required .class files

What wrong i am doing i want to get result in android app after connecting from openERP

Hopes for your suggestion

Thanks

Upvotes: 0

Views: 321

Answers (0)

Related Questions