Research Log of Web Science Students

Computer Science is not simply programming

Learning GWT-RPC

leave a comment »

1. Well first off, I got to a bumpy start.  I wanted to add a GWT module to my developer sandbox but at first I didn’t know how.

You need a module file to make GWT work and the html file where the javascript generated by GWT will be hosted. Those are  pretty complicated to setup–manually. The module file is an xml file that needs a namespace and the javascript is very — well I don’t how to start explaining where to get that from. GWT doesn’t show you the generated javascript script.

But as it turns out, the GWT plug-in takes care of this for you! (Why didn’t I think of that in the first place?) Simply hit ctrl+n and create a module, html file or entry point.

2. So I tried applying what I’ve learned and after hurdling a few mistakes (no I still can’t make GWT RPC work), I finally find myself needing to learn how to integrate GWT with Spring for Hardwire’s requirements (since it uses the Spring framework).

This is the culprit:



Instead of the RPC going to the lookupService, it goes to the DispatcherServlet a.k.a Sandbox. That’s why I get this error:

11 1, 09 5:20:59 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
WARNING: No mapping found for HTTP request with URI [/org.sandbox.Rex/lookup] 
in DispatcherServlet with name 'sandbox'

I could do a workaround by making all the requests to the url /app/*, meaning dynamic pages to go to the Sandbox dispatcher servlet while on the other hand all rpc calls destined for the lookupService must address to the url services/*.

But this is ugly, would you want to type in to go to hardwire? I didn’t think so.

Besides I’ve always wanted the the RPC service to be exposed as a spring bean so that I can make use of the other POJOs I’ve made.

Ergo, I am going back tomorrow and work on doing this tutorial instead. Pretty neat stuff if you ask me.


Written by Jose Asuncion

November 1, 2009 at 6:36 pm

Posted in Hardwire

Tagged with , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: