gwtrpccommlayer to access GWT RPC servlet from a non-GWT / Java client

76 views
Skip to first unread message

Gaaroth

unread,
Apr 9, 2013, 11:06:30 AM4/9/13
to gwtrpcc...@googlegroups.com
Hi folks! I know this project is no longer active, but seems to be the only library that i can use to achieve my needs.
I have a full GWT (GXT actually but doesnt matter) client - server webapp and i want to create a simple mobile service (GWT & GXT do not give enough "mobile" feel to me) to retrive / send some data.
This library actually breaks the GWT requirement on client, but i still need to use java, afaik. What i need is a way to call those server methods with ajax in a jQuery-mobile client context.
Obviously i dont want my dirty work done, but just the right info to get it done. What i need to do?

I've looked into this, but there are no concrete answers.
http://www.coderanch.com/t/580197/GWT/Exposing-GreetingServiceImpl-web-service

TLDR
gwtrpccommlayer frees gwt servlet from a gwt client...how can i access those methods with a plain ajax call?

PS 
possibly i don't want to touch my rpc methods...but i can add more services/methods that call those existing servlet, acting like a "bridge", if that's what is needed.

Thanks for any help!

Dan Billings

unread,
Apr 9, 2013, 11:19:09 AM4/9/13
to gwtrpcc...@googlegroups.com
1)  If you are doing mobile w/ jQuery, then you aren't using GWT?
2)  If 1) is true, you don't need any of this, you just need web services that accept and return JSON.


--
You received this message because you are subscribed to the Google Groups "gwtrpccommlayer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gwtrpccommlay...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Message has been deleted

Gaaroth

unread,
Apr 9, 2013, 11:28:38 AM4/9/13
to gwtrpcc...@googlegroups.com
What do you mean with "use GWT" ??

Maybe i wasn't clear:
-i have a full GWT application (both client and server)
-i want to do not touch the server, but i can add methods/servlets
-i need to switch GWT java->JS compiled client with a reduced jQuery one that does only fewer operations

Gaaroth

unread,
Apr 9, 2013, 11:32:12 AM4/9/13
to gwtrpcc...@googlegroups.com
what i mean is that i dont want to REWRITE those methods, but use them, at least wrapping or calling them in some other way
this lib seems good for this

Dan Billings

unread,
Apr 9, 2013, 11:36:58 AM4/9/13
to gwtrpcc...@googlegroups.com
I don't believe you understand what this library does for you.  It allows you to call GWT RPC from regular Java code.  You are talking about web dev which is wholly irrelevant.  

This library will not help you browser <--> server.


On Tue, Apr 9, 2013 at 11:32 AM, Gaaroth <marcell...@gmail.com> wrote:
what i mean is that i dont want to REWRITE those methods, but use them, at least wrapping or calling them in some other way
this lib seems good for this

--

Gaaroth

unread,
Apr 10, 2013, 6:35:43 AM4/10/13
to gwtrpcc...@googlegroups.com
Alright i've made it.

I used the example in the library and added a simple method "public Integer getNum()" in the Main.java to retrive getUserFormDataCount() only.
Take care of the URL you create when you'll deploying all this somewhere!
After that I created a simple jsp that instances Main class and calls this new method, encoding the response in a JSON.
Now you can call this jsp from anywere and get your data.

To achieve this you'll need:
- json-simple-1.1.1
- httpcomponents-client-4.2.3

See ya!

Reply all
Reply to author
Forward
0 new messages