问题
I am working on an android application which is able to connect with an openerp server and retrive the userid and also the individual fields of the different contacts of that user.
below is the code on the things i have done so far
public int Search()
{
searchClient = new XMLRPCClient("http://"+lp.HOST+":"+lp.IN_PORT+lp.URL_XML+lp.URL_OBJECT);
try
{
record = (Array[]) searchClient.call("search",lp.DB_NAME, lp.uid1, lp.PASSWORD, "res.partnet.contact","execute", arguments);
}
catch(Exception e)
{
Log.i("------------------ CONNECTION FAILED Search", e.toString());
}
return 0;
}
i appreciate the help given
Thank you,
回答1:
try to interchange the position of method search
and execute
.The method execute
must be given before search
.Also try searchClient.callEx
instead call only like you do it above!
record = (Array[]) searchClient.callEx("execute",lp.DB_NAME, lp.uid1, lp.PASSWORD, "res.partnet.contact","search", arguments);
来源:https://stackoverflow.com/questions/5648724/android-openerp-search-request-xmlrpc