# How can I use php xmlrpc  in the shopware plugin to send data from shopware to odoo end.

**URL:** <https://forum.shopware.com/t/how-can-i-use-php-xmlrpc-in-the-shopware-plugin-to-send-data-from-shopware-to-odoo-end/72384>\
**Category:** Programming (EN)\
**Created:** [28. Januar 2021 um 12:41 UTC](https://forum.shopware.com/t/how-can-i-use-php-xmlrpc-in-the-shopware-plugin-to-send-data-from-shopware-to-odoo-end/72384 "2021-01-28T12:41:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![karan\_negx](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@karan\_negx](https://forum.shopware.com/u/karan_negx)\
**Post date:** [28. Januar 2021 um 12:41 UTC](https://forum.shopware.com/t/how-can-i-use-php-xmlrpc-in-the-shopware-plugin-to-send-data-from-shopware-to-odoo-end/72384/1 "2021-01-28T12:41:34Z")

</div>

I’ve tried the code in my custom shopware 6 plugin but it says&nbsp; “Uncaught Error: Class ‘Webkul\Swerpsync\Controller\Api\xmlrpc\_client’ not found”.

I’ve attached the full response and the code as well.

namespace Webkul\Swerpsync\Controller\Api;

require “xmlrpc.inc”;

public function testConnection($configValues)

{

file\_put\_contents( \_\_DIR\_\_ ."/test.txt", “inside test connection method\n”);

file\_put\_contents( \_\_DIR\_\_ ."/test.txt", \_\_DIR\_\_."/xmlrpc.inc\n");

&nbsp;

$url = “[http://192.168.10.13](http://192.168.10.13)”;

$port = “8003”;

$db = “wc”;

$user = “admin”;

$pwd = “webkul”;

file\_put\_contents( \_\_DIR\_\_ ."/test.txt", “before response from server.\n”, FILE\_APPEND);

$sock = new xmlrpc\_client($url.":".$port."/xmlrpc/common");

$client = new xmlrpc\_client($url.":".$port."/xmlrpc/object");

$msg = new xmlrpcmsg(‘login’);

$msg-\>addParam(new xmlrpcval($db, ‘string’));

$msg-\>addParam(new xmlrpcval($user, ‘string’));

$msg-\>addParam(new xmlrpcval($pwd, ‘string’));

$resp = $sock-\>send($msg);

file\_put\_contents( \_\_DIR\_\_ ."/test.txt", “after response from server.\n”, FILE\_APPEND);

if (!$resp-\>faultCode()){

$userId = $resp-\>value()-\>scalarval();

}

return $configValues;

---

<div class="post-metadata">

**Author:** ![FSA](https://avatars.discourse-cdn.com/v4/letter/f/e9a140/32.png) [@FSA](https://forum.shopware.com/u/FSA)\
**Post date:** [4. Februar 2021 um 22:51 UTC](https://forum.shopware.com/t/how-can-i-use-php-xmlrpc-in-the-shopware-plugin-to-send-data-from-shopware-to-odoo-end/72384/2 "2021-02-04T22:51:51Z")

</div>

my hottest guess is that you dont have the xmlrpc package for php installed on your server

&nbsp;

and all i am reading about xmlrpc on the internet is, that you shouldn’t use it due to security issues
