GWT-RPC via JSONP?

2010-06-16 Thread Chris Lercher
Hi, would it be possible to somehow wrap a GWT-RPC in a JSONP call? I mean, at the end of the day, GWT-RPC also just sends a string in an HTTP POST message (along with some headers), so theoretically it should be possible to use that String as a JSON string, maybe alongside the headers to form a

Re: GWT-RPC via JSONP?

2010-06-16 Thread Chris Lercher
Okay, thinking about it, maybe this is a stupid idea. Since I can send only an URL (and not a POST body) with a JSONP call, I guess, the URL probably can't take very long strings... On Jun 16, 9:27 pm, Chris Lercher cl_for_mail...@gmx.net wrote: Hi, would it be possible to somehow wrap a

Re: GWT-RPC via JSONP?

2010-06-16 Thread Sripathi Krishnan
No, it won't. 1. GWT RPC exclusively uses POST. JSONP uses a script tag, which is essentially a GET request. You can't make a POST request using a script tag. 2. RPC adds custom http headers to the request (X-GWT-Permutation, or something like that). You cannot setup custom http

Re: GWT-RPC via JSONP?

2010-06-16 Thread Chris Lercher
Hi Sri, I mean of course, that there would have to be a component (e.g. Servlet) on the server side, that re-translates the get request, and then calls the RemoteServlet (or something underlying), as if a usual GWT-RPC request had been issued. Se we would basically use JSONP as a tunnel. [The

Re: GWT-RPC via JSONP?

2010-06-16 Thread Sripathi Krishnan
Just did some digging in, and I *think* it is possible with some restrictions. The restrictions being - - No support for request headers - Reduced error handling. For example, a 404 cannot be detected easily... The basic idea is to use DeRPC infrastructure because it already returns

Re: GWT-RPC via JSONP?

2010-06-16 Thread Chris Lercher
That was fast - awesome post. It sounds feasible, and I'm considering to use it. Still wondering, if it would be significantly slower than plain GWT-RPC? The sending limit of 2kB Client-Server will be enough for at least most of my queries - I must still evaluate, if it's enough for absolutely all

Re: GWT-RPC via JSONP?

2010-06-16 Thread Sripathi Krishnan
I think a quick PoC should answer your questions, but here is what I think - Still wondering, if it would be significantly slower than plain GWT-RPC? No reason for it to be slower than regular RPC. Thinking about it, you should be able to use the regular RPC payload wrapped in a JSONP style