GithubHelp home page GithubHelp logo

subutux / json-rpc2php Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 26.0 63 KB

A json-rpc 2.0 server for php and some clients for php,js,python and vala.

License: GNU General Public License v2.0

Vala 15.51% PHP 55.38% Python 13.70% JavaScript 15.42%

json-rpc2php's People

Contributors

pyatka-ubiyca avatar subutux avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

json-rpc2php's Issues

PHP Warning

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

Custom error codes

Hi, Subutux!

Is there a way to generate and use custom error codes?

Thank you!

Sergey

How to wait till jsonrpc client returns response.

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.

Correct javascript type

Please correct your javascript example

With type attribute to type="text/javascript" correct one.

Changes on My version php

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

javascript client require jquery ?

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.