Android OpenErp Search Request XMLRPC

时光总嘲笑我的痴心妄想 提交于 2019-12-12 02:03:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!