subutux / json-rpc2php Goto Github PK
View Code? Open in Web Editor NEWA json-rpc 2.0 server for php and some clients for php,js,python and vala.
License: GNU General Public License v2.0
A json-rpc 2.0 server for php and some clients for php,js,python and vala.
License: GNU General Public License v2.0
call_user_func_array() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in json-rpc2php-master/jsonRPC2Server.php
my php version 5.6
Hello,
I found unable to use inline. like...
rpc.myClass.ping("tejas tank, snippetbucket.com")
I had unable to use like this way. Please providing best possible examples to use it.
Thanks,
Tejas Tank
Hi, Subutux!
Is there a way to generate and use custom error codes?
Thank you!
Sergey
If I write a sample perl client, will you accept the code?
I have JS client:
In JS I have function:
----------------------Start code-------------------
var codebook_onlinedb;
function getCodeBook() {
jsonrpcclient = new jsonrpcphp('http://some.url/server.php', function() {
jsonrpcclient.cCodeBook.getCodeBook("inout", function(jsonRpcObj) {
codebook_onlinedb = $.map(jsonRpcObj.result, function(value, index) {
return [value];
});
});
});
function doSomething() {
console.log( 'main: ' + codebook_onlinedb);
}
var x = getCodeBook();
doSomething();
End of code
In firebug console: http://oi61.tinypic.com/2u7m1r9.jpg
In firebug console I have two POST calls. First gives me a list of methods and second gives me correct response to my task but my JS function doSomething is performed in first POST. Why? Or how can I wait to correct response from second POST. Thanks.
Please correct your javascript example
With type attribute to type="text/javascript" correct one.
helllo
On the server there is something sttrage :
in funtion
private function validate() {
.......
if (!isset($this->classes[$this->extension]) || !method_exists($this->classes[$this->extension],$this->request['method']) && $this->extension != "rpc"){
###hacks
if($this->request['method']!='listMethods'){
throw new Exception($this->errorCodes['methodNotFound']);
}###hacks
};
........
}
i had to add the "if($this->request['method']!='listMethods'){" because fails to get the "listMethods" and raise "rpcException: -32601::Method not found" on Debian Unstable and PHP 5.5.9-1
Implement batch rpc calls
I found that, your javascript file depends on jquery,
so please add note in documentation, to include jquery file before your js file.
Best wishes for pure GPL codes & libraries.
Please keep it update & also suggest you to enhance speed & performances.
Thanks,
Tejas Tank.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.