qomo / json-rpc Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/json-rpc
Automatically exported from code.google.com/p/json-rpc
What steps will reproduce the problem?
1. execute request
2. get the reponse
"{"result":null,"error":{"code":-32002,"message":"service.invalid-parameters","d
ata":{"email":["'email' is no valid email address in the basic format
local-part@hostname"]}},"id":"1890594141"}"
3. catch UnsupportedOperationException
JsonRpcInvoker.java, line 108:
String data = (o.has("data") ? o.get("data").getAsString() : null);
if "data" is json, o is JsonObject, which throws UnsupportedOperationException
on getAsString();
You should check where o is JsonObject and return obj.toString() if true.
Original issue reported on code.google.com by [email protected]
on 24 May 2011 at 11:44
What steps will reproduce the problem?
1. Either (async or sync) AJAX call or Java invoke to JsonRPC Jetty servlet
What is the expected output? What do you see instead?
Normal response, but get ClassCastException from Servlet, possibly due to
EOFException in javacc parser?
What version of the product are you using? On what operating system?
jsonrpc-1.0.jar on jetty-6.1.24.jar DefaultServlet
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 20 Jan 2012 at 10:58
While writing the data in binary via JsonRpcServletTransport, it doesn't honor
the response encoding already set.
Original issue reported on code.google.com by [email protected]
on 25 Jan 2012 at 2:37
What steps will reproduce the problem?
1. Start a Jsonrpc service on a server using locale x
2. Call a method on the server with a javaclient using locale y that has
serialized java.util.Date
What is the expected output? What do you see instead?
Instead of a value from server
What version of the product are you using? On what operating system?
I'm running 1.0 version of json-rpc in a jetty8 servlet container running on
linux debian.
Clients are Java Apps running on multiple platforms.
Please provide any additional information below.
A quick fix is of course to make sure you have the same Locale on both server
and client. I can see a need to have clients on different Locales. I'm not sure
if this is a gson issu as it's gson that seems to encode/decode the Date object
to Json using the default locale pattern.
Original issue reported on code.google.com by [email protected]
on 31 Jan 2012 at 3:40
To optimize the response payloads, specifically useful from Android, gzip
decoding has to be supported.
Original issue reported on code.google.com by [email protected]
on 26 Jan 2012 at 5:36
Hi,
fyi, there is a small typo in the usage documentation. Where it says
executor.add("calc", calcImpl, Calculator.class);
it should say
executor.addHandler("calc", calcImpl, Calculator.class);
Original issue reported on code.google.com by [email protected]
on 18 Oct 2011 at 5:39
Is there any possibility of my methods return a class created by me?
Eg:
class Student {...}
public Student getStudent () //Return a student object
Thanks in advance
Original issue reported on code.google.com by [email protected]
on 19 Oct 2012 at 9:55
Basically, just set the proper header (Base64.js needed:
http://www.webtoolkit.info/javascript-base64.html):
--- a/lib/jsonrpc.js
+++ b/lib/jsonrpc.js
@@ -178,7 +178,10 @@ JsonRpc.ServiceProxy.prototype.__callMethod =
function(methodName, params, succe
xhr = new ActiveXObject('Microsoft.XMLHTTP');
}
}
- xhr.open('POST', this.__serviceURL, this.__isAsynchronous,
this.__authUsername, this.__authPassword);
+ xhr.open('POST', this.__serviceURL, this.__isAsynchronous);
+ if(this.__authUsername != null && this.__authPassword != null){
+ xhr.setRequestHeader('Authorization', "Basic
"+Base64.encode(this.__authUsername+":"+this.__authPassword));
+ }
xhr.setRequestHeader('Content-Type', 'application/json');
xhr.setRequestHeader('Accept', 'application/json');
Original issue reported on code.google.com by desfrenes
on 25 Mar 2012 at 8:34
Attachments:
i saw that sentences..
not allow list or map ....
is it true?
could i use list or map? (return value)
Original issue reported on code.google.com by [email protected]
on 15 May 2011 at 7:34
What steps will reproduce the problem?
1. The communication with the server is established
(HttpJsonRpcClientTransport(new URL(url));)
2. The invoker is obtained with success (calc = invoker.get(...))
3. The problem is here, when i call the method calc.add(1, 2) it gives me a
JsonRpcClientException: unable to get data from transport. I can not find a
reason for it.
What is the expected output? What do you see instead?
The output is the sum of 1 + 2. It gives me an exception
What version of the product are you using? On what operating system?
MacOs X, Android Simulator and RPC Server are Jboss AS.
Original issue reported on code.google.com by [email protected]
on 4 Oct 2012 at 11:27
What steps will reproduce the problem?
1. Using Grails 1.3.7 and Eclipse, set up BuildConfig.groovy with maven config
for org.json.rpc:jsonrpc:1.0, repo http://json-rpc.googlecode.com/svn/mavenrepo
2. Refresh dependencies from eclipse
What is the expected output? What do you see instead?
I believe the POM file for artifact jsonrpc is broken; the error message I see
is: org.json.rpc#jsonrpc;1.0: java.text.ParseException: inconsistent module
descriptor file found in
'http://json-rpc.googlecode.com/svn/mavenrepo/org/json/rpc/jsonrpc/1.0/jsonrpc-1
.0.pom': bad revision: expected='1.0' found='1.0-SNAPSHOT';
What version of the product are you using? On what operating system?
Windows 7, jsonrpc 1.0
Please provide any additional information below.
Original issue reported on code.google.com by [email protected]
on 27 Feb 2012 at 3:00
First thanks and congratulations for providing such a well designed RPC
framework.
What I found outstanding:
1)
JsonRpcExecutor#addHandler(String name, ..). This provides a level of security and convenience, i.e. it does not expose the server class name. A very positive effect is that server side re-factoring does not break client implementations.
2)
A Java client is provided, which allows for unit testing of server code, and evaluation.
Back o the point.
With RPC, there is often a security aspect, authenticatiion. Most robust
authentication on the internet is token based.
The the following discussion "json-rpc authentication?"
http://groups.google.com/group/json-rpc/browse_thread/thread/3cde3ada0e3dc8bf
mentions "authentication on transport-level" which is the background of this
issue.
To implement such authentication, the java client code needs access to session
cookies.
On the server side, such support would also be desirable, but this is not so
critical because unlike with the client code, server session support can be
implemented without changing any RPC framework code.
Original issue reported on code.google.com by [email protected]
on 24 Jan 2012 at 8:39
If a handler interface includes a method that throws a checked Exception then
it would be useful that the exception is serialized and re-thrown in the Java
client so that its attributes can be used as with any other object.
A typical use case would be a NotAuthorizedException or NotLoggedInException
Currently one could use one of the fields in
org.json.rpc.commons.JsonRpcRemoteException e.g. data which contains the stack
trace.
However sending a server stack trace to the client can cause problems whether
from a checked or unchecked exception, so it might be useful to remove this
information anyway and instead refer to the server log.
May be GWT could be useful for some ideas:
http://code.google.com/webtoolkit/doc/1.5/tutorial/RPC.html
Original issue reported on code.google.com by [email protected]
on 11 Feb 2012 at 9:17
As a workaround for issue 8
http://code.google.com/p/json-rpc/issues/detail?id=8 I use a custom data type
that does not have locale issues:
public class SimpleDate implements Serializable{
private int year;
private int month;
private int day;
...
}
I use this in another top level return type:
public class Result implements Serializable{
private SimpleDate date1;
private SimpleDate date2;
...
}
With this code, I get an exception:
at org.json.rpc.commons.GsonTypeChecker.isValidType(GsonTypeChecker.java:106)
at org.json.rpc.commons.GsonTypeChecker.isValidType(GsonTypeChecker.java:128)
at org.json.rpc.commons.GsonTypeChecker.isValidType(GsonTypeChecker.java:30)
at org.json.rpc.commons.TypeChecker.isValidMethod(TypeChecker.java:44)
at org.json.rpc.commons.TypeChecker.isValidInterface(TypeChecker.java:99)
at org.json.rpc.server.HandleEntry.<init>(HandleEntry.java:53)
at org.json.rpc.server.JsonRpcExecutor.addHandler(JsonRpcExecutor.java:81)
at com.mycompany.JsonRpcServlet.bind(JsonRpcServlet.java:25)
at com.mycompany.JsonRpcServlet.<init>(JsonRpcServlet.java:18)
Original issue reported on code.google.com by [email protected]
on 14 Mar 2013 at 10:11
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.