• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Exposing GreetingServiceImpl as web service

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use something like this
 
Vikram Kohli
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Maneesh. Will explore on that.

Regards,
Vikram

 
Vikram Kohli
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
"Don't believe every tiny ad you see on the internet. But this one is rock solid." - George Washington
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic