P.S. This servlet is only taking http post with the payload(method +
params) encoded with json. metaparadigm also distributed a client side
jsonrpc.js. I guess I am looking for example with JSNI, right?
Thanks
http://ffxml.net/gwt-json-rpc.html
Florian
http://ffxml.net/assets/files/json-rpc-java-test.zip
Florian
I ran my test in hosted mode. I tried with
oss.metaparadigm.com/jsonrpc-cvs/hello.jsp and kept gettng error: 404.
I'm not sure if this is related to the session the jsp page expected?
kenny wrote:
> Florian:
> Couple of things to check w/ you.
> 1. since the HashMap does not ensure the key order, the resulting
> encoded json string would have
> params, method, id in any arbitrary order. I used ethereal to examine
> the http packet, the oss demo pages always sent out the order id,
> method, params. Is this ok?
The order of object properties does not matter because you only can
access them by name, not by index. So it's ok.
> 2. the id value seems to be 0 all the time, should it be set to the
> requestCounter?
It works as long as you don't share callback objects between different
requests. Even with concurrent requests it works that way.
I always create a new callback object for each request, so it did not
bother me yet. Is this a problem in your case?
>
> I ran my test in hosted mode. I tried with
> oss.metaparadigm.com/jsonrpc-cvs/hello.jsp and kept gettng error: 404.
> I'm not sure if this is related to the session the jsp page expected?
Because the JSONRPCServlet is located at this URL, if I am right:
http://oss.metaparadigm.com/jsonrpc-cvs/JSON-RPC
But even with this URL I did not get it working. I always got an error
"...method not found..." or similar. I can't figure out what the
problem is. And with my own JSONRPCServlet it worked. So i did not
investigate this any longer.
Florian
Thanks again for your help.
- Kenny
- Kenny