CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm new to OpenERP and building a webservice in c# to communicate with a windows openerp server. I'm trying to call the following method in c#:
var RpcClient = XmlRpcProxyGen.Create<iopenerp>();
Object resSearch = RpcClient.search(DbName, UserId, Pwd, "product.product", "search", conditions.ToArray());
I'm getting the following exception: Server returned a fault exception: [Method not found: execute] Traceback (most recent call last): File "C:\Program Files (x86)\OpenERP 7.0-20130404-232436\Server\server.\openerp\service\wsgi_server.py", line 82, in xmlrpc_return File "C:\Program Files (x86)\OpenERP 7.0-20130404-232436\Server\server.\openerp\netsvc.py", line 293, in dispatch_rpc File "C:\Program Files (x86)\OpenERP 7.0-20130404-232436\Server\server.\openerp\service\web_services.py", line 430, in dispatch Exception: Method not found: execute
The search method in IOpenErp is
[XmlRpcMethod("execute")] Object search(string dbName, int userId, string pwd, string model, string method, Object filters);
Any suggestions are much appreciated
I'm not familiar at all with c# language, but I practice a bit XML RPC on OpenERP. I feel that you "shift" some part of your construction. The error message you display is the answer from the XML RPC server on OpenERP, not a "local execution" error from your "client side". This mean XML RPC search should theoretically looks like :
< PART ONE XML RPC call > < PART TWO OpenERP method call > bla bla bla **'execute'** bla bla bla string dbName, int userId, string pwd, ....
I don't know why but it appear that "execute" word (the XML order) fall in "PART TWO" which should be the OpenERP query code itself.
In perl (I'm more familiar with perl) search query should looks like (just as example) :
my $ids = $server->call('execute', $db, $uid, $pw, $model, 'search', $query);
So,... I feel confident your issue is more a c# issue (bad syntax/construction in XMC RPC call) rather than in specific OpenERP XML RPC syntax.
Hope this will help you. Have a nice day @++ Nicolas
About This Community
Odoo Training Center
|Asked: 4/11/13, 7:51 PM|
|Seen: 5400 times|
|Last updated: 3/16/15, 8:10 AM|