i have tried to issue json-rpc request to sems. i have tried with
various json-rpc clients (python and php), but sems does not understand
the request.
based on reading the source, sems implements json-rpc version 2.0
server.
one script i have used for testing is this:
#!/usr/bin/php
<?php
require_once("include.php");
//$connection = Tivoka\Client::connect(array('host' => '127.0.0.1', 'port' =>
7080));
$connection = Tivoka\Client::connect('http://127.0.0.1:7080');
$request = $connection->sendRequest('calls');
print $request->result;
?>
i have tried both json-rpc over tcp (commented out in above) and
json-rpc over http.
in both cases, sems reports to syslog something like this:
May 22 13:41:41 siika sems[25160]: [#7f6f56fb0700] [JsonrpcPeerConnection,
RpcPeer.h:79] DEBUG: created connection '309F4F23-537DD465000D002D-56FB0700'
May 22 13:41:41 siika sems[25160]: [#7f6f56fb0700] [registerConnection,
RpcServerLoop.cpp:458] DEBUG: registered connection
'309F4F23-537DD465000D002D-56FB0700'
May 22 13:41:41 siika sems[25160]: [#7f6f56fb0700] [read_cb,
RpcServerLoop.cpp:112] DEBUG: read_cb in connection 0x2535980
May 22 13:41:41 siika sems[25160]: [#7f6f56fb0700] [netstringsRead,
RpcPeer.cpp:211] DEBUG: received '{'
May 22 13:41:41 siika sems[25160]: [#7f6f56fb0700] [netstringsRead,
RpcPeer.cpp:257] INFO: Protocol error on connection [0x2535980/47]: invalid
character in size
May 22 13:41:41 siika sems[25160]: [#7f6f56fb0700] [notifyDisconnect,
RpcPeer.cpp:50] DEBUG: notifying event receivers about broken connection
May 22 13:41:41 siika sems[25160]: [#7f6f56fb0700] [removeConnection,
RpcServerLoop.cpp:472] DEBUG: deregistered connection
'309F4F23-537DD465000D002D-56FB0700'
May 22 13:41:41 siika sems[25160]: [#7f6f56fb0700] [~JsonrpcPeerConnection,
RpcPeer.h:83] DEBUG: destroying connection '309F4F23-537DD465000D002D-56FB0700'
any hints what is wrong with sending of the request?
-- juha
_______________________________________________
Sems mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/sems