This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes GWT and the fly likes Exposing GreetingServiceImpl as web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Exposing GreetingServiceImpl as web service" Watch "Exposing GreetingServiceImpl as web service" New topic
Author

Exposing GreetingServiceImpl as web service

Vikram Kohli
Ranch Hand

Joined: Nov 27, 2005
Posts: 174
Hi all,

Problem scenario is: I am writing a Google Gadget. Data presented in the gadget will come from my deployed gwt app. I am planing to call the web service from JS to show the required data.

I need to know how I can expose the Service implementation class like GreetingServiceImpl(generated by default as sample in Eclipse GWT project) as web service.


Regards,
Vikram


Vikram PracLabs
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10171
    
    8

You can use something like this


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Vikram Kohli
Ranch Hand

Joined: Nov 27, 2005
Posts: 174
Thanks Maneesh. Will explore on that.

Regards,
Vikram

Vikram Kohli
Ranch Hand

Joined: Nov 27, 2005
Posts: 174
Approach suggested http://code.google.com/p/gwtrpccommlayer/ will not work as, it is meant for the the consumption from java based client. Where as I am trying to invoke the web service through Java Script.

I either need to expose GreetingServiceImpl as a SOAP web service or as a REST full web service. I followed the tutorial given here. But instead of creating the Dynamic Web Project, I am trying this in the GWT project it self. But its giving the 404 error.

here is the code.



Servlet declaration in web.xml



And finally I HTML, having java script code to call the above service



Can anyone please give pointer on how can I solve this problem
Vikram Kohli
Ranch Hand

Joined: Nov 27, 2005
Posts: 174
Guys need help...

Please provide input, or there is any other way around to expose the logic written in the Service implementation class . I need to develope a Google Gadget/Wordpress Widget, and it needs data from my GWT app, how I can achieve this?

Thanks & Regards,
Vikram
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exposing GreetingServiceImpl as web service
 
Similar Threads
Is GWT preferable for large scale projects?
Invoking the spring webproject from gwt web application
How to add google gadget in XHTML page?
Loading multiple different GWT Applications at runtime from other GWT Web App
GWT to access Serial or USB port using Java Communications API (javax.comm) or RXTX