gamenet / php-jabber-rpc

PHP wrapper for ejabberd xml-rpc module
MIT License
18 stars 13 forks source link

Creating User #8

Closed lakshmaji closed 8 years ago

lakshmaji commented 8 years ago

I am using the following code

require_once __DIR__.'/vendor/autoload.php';
// use \GameNet;

    $rpc = new \GameNet\Jabber\RpcClient([
        'server' => 'http://127.0.0.1:4560',
        'host' => 'lakki.com',
        'debug' => false,
    ]);

    //Create 2 new users with name `Ivan` and `Petr` with password `someStrongPassword`
    $rpc->createUser('Ivan', 'someStrongPassword');

When I'm trying to excute the script I was getting following error

Argument 1 passed to fXmlRpc\Transport\HttpAdapterTransport::__construct() must be an instance of Http\Message\MessageFactory, instance of Ivory\HttpAdapter\CurlHttpAdapter given, called in /var/www/html/php-jabber-rpc/lib/GameNet/Jabber/RpcClient.php on line 140 and defined in /var/www/html/php-jabber-rpc/vendor/lstrojny/fxmlrpc/src/fXmlRpc/Transport/HttpAdapterTransport.php on line 39

What is wrong in my script??

gunblues commented 8 years ago

I got the same error too.

lakshmaji commented 8 years ago

@gunblues Hi , Have you got any solution to fix above issue

gunblues commented 8 years ago

@lakshmajim Hi, I haven't go any solution yet.