/ Published in: PHP
URL: http://doc.openerp.com/developer/6_22_XML-RPC_web_services/
Here is an example on how to insert a new partner using PHP. This example makes use the phpxmlrpc library, available on sourceforge.
Expand |
Embed | Plain Text
<? include('xmlrpc.inc'); 'name'=>new xmlrpcval('Fabien Pinckaers', "string") , 'vat'=>new xmlrpcval('BE477472701' , "string") ); $client = new xmlrpc_client("http://localhost:8069/xmlrpc/object"); $msg = new xmlrpcmsg('execute'); $msg->addParam(new xmlrpcval("dbname", "string")); $msg->addParam(new xmlrpcval("3", "int")); $msg->addParam(new xmlrpcval("demo", "string")); $msg->addParam(new xmlrpcval("res.partner", "string")); $msg->addParam(new xmlrpcval("create", "string")); $msg->addParam(new xmlrpcval($arrayVal, "struct")); $resp = $client->send($msg); if ($resp->faultCode()) else ?>
Comments
Subscribe to comments
You need to login to post a comment.

Access Open-server using xml-rpc
Download the XML-RPC framework for PHP windows / linux: download the xml-rpc framework for php from http://phpxmlrpc.sourceforge.net/ The latest stable release is version 2.2 released on February 25, 2007
Setup the XML-RPC for PHP extract file xmlrpc-2.2.tar.gz and take the file xmlrpc.inc from lib directory place the xmlrpc.inc in the php library folder restart the apcahe/iis server