RequestFactory access from Android

395 views
Skip to first unread message

Patrick Julien

unread,
Feb 14, 2011, 2:56:45 PM2/14/11
to google-web-tool...@googlegroups.com
Anywhere I should start looking? This is JSON and everything but I
want to access GWT services from Android and wp7.

Thomas Broyer

unread,
Feb 14, 2011, 5:35:33 PM2/14/11
to google-web-tool...@googlegroups.com
"""The RequestFactoryMagic type can be used to instantiate RequestFactory instances in non-GWT runtimes. […] If you implement your ownRequestTransport (perhaps based on a java.net.HttpUrlConnection or Apache HttpClientlibrary), you can write console apps, bulk-query apps, or health probers using your production RequestFactory endpoints. This is a huge improvement over GWT`s old RPC system, which only supports GWT-based clients.""" 
— Source: http://stackoverflow.com/questions/4853188/unit-testing-of-gwt-requestfactory-services-without-gwttestcase/4926160#4926160

Patrick Julien

unread,
Feb 14, 2011, 6:39:12 PM2/14/11
to google-web-tool...@googlegroups.com
Thanks. The worst thing is, is that I remember seeing this thing a
while back now that you point it out again. That will help for
android and other java based platforms.

> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

BobV

unread,
Feb 15, 2011, 1:09:33 PM2/15/11
to google-web-tool...@googlegroups.com
RequestFactoryMagic works on Android, but you'll need to do some build
hacking to get RF it to compile against the Android SDK.

Here's what I did as an experiment:

1) Extract autobean/{shared, server}/** and requestfactory{shared,
server/testing}/** from gwt-user.jar.
1a) There are a few other build dependencies to tease out.
2) Write a RequestTransport that uses java.net.HttpUrlConnection or
the Apache HttpClient libs.
3) IIRC, there's one or two minor API incompatibilities in the
org.json APIs built into the ADK, but they're simple to fix.

Being able to put together a self-contained requestfactory-client.jar
would go a long way to improving code re-use for GWT devs who want
Android clients (and hopefully the other way around).

--
Bob Vawter
Google Web Toolkit Team

Patrick Julien

unread,
Feb 15, 2011, 4:40:52 PM2/15/11
to google-web-tool...@googlegroups.com
Thanks Bob, do you mind if I file an issue to formally request this?

At this stage, I have it compiling but unable to parse requests on the server

> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

Patrick Julien

unread,
Feb 16, 2011, 12:22:05 PM2/16/11
to google-web-tool...@googlegroups.com
Ah, never mind, I think the idea is to use this new JSON-RPC support.
This will also solve the issue of accessing from wp7
Reply all
Reply to author
Forward
0 new messages