Advertisement
Guest User

Untitled

a guest
Jan 10th, 2014
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. private URI uri;
  2. uri = URI.create("http://192.168.100.29:8069");
  3. client = new XMLRPCClient(uri);
  4.  
  5. Array[] arr;
  6. arr = (Array[]) client.call("search", "DevDB", "admin",
  7. "password", "product.product", "execute");
  8.  
  9.  
  10. HttpResponse response;
  11. response = client.execute(postMethod);
  12.  
  13. String res = null;
  14. if (null != response) {
  15. HttpEntity resEntity = response.getEntity();
  16. res = EntityUtils.toString(resEntity);
  17. }
  18.  
  19. OpenErpConnect op = OpenErpConnect.connect("http://192.168.100.29:8069/", 8069, "DevDB", "admin", "openerp");
  20.  
  21. URL loginUrl = new URL("http://192.168.100.29:8069/");
  22. XMLRPCClient client = new XMLRPCClient(loginUrl);
  23. Integer id = (Integer)client.call("login", db, user, pass);
  24. connection = new OpenErpConnect(server, port, db, user, pass, id);
  25.  
  26. OpenErpConnect localOpenErpConnect = new OpenErpConnect(
  27. paramString1, paramString2, paramInteger, paramString3,
  28. paramString4, paramString5,
  29. (Integer) new XMLRPCClient(new URL(paramString1,
  30. paramString2, paramInteger.intValue(),
  31. "/xmlrpc/common")).call("login", paramString3,
  32. paramString4, paramString5));
  33.  
  34. Long[] ids = conn.search("product.product", new Object[0]);
  35. System.out.println(ids);
  36.  
  37.  
  38. Object[] responseIds = (Object[]) client.call("execute",
  39. parameters);
  40.  
  41. Traceback (most recent call last):
  42. File "/opt/openerp/v7/server/openerp/service/wsgi_server.py", line 82, in xmlrpc_return
  43. result = openerp.netsvc.dispatch_rpc(service, method, params)
  44. File "/opt/openerp/v7/server/openerp/netsvc.py", line 292, in dispatch_rpc
  45. result = ExportService.getService(service_name).dispatch(method, params)
  46. File "/opt/openerp/v7/server/openerp/service/web_services.py", line 611, in dispatch
  47. (db, uid, passwd ) = params[0:3]
  48. ValueError: need more than 1 value to unpack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement