1

What type of web service is supported by gwt application i have tried using Jersey, RESTful, Restlet, but nothing works with GWT. I want to deploy Web-Service on Tomcat and GWT application on app engine.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Ankit Singla
  • 198
  • 2
  • 15

2 Answers2

1

You can use RPC and RequestBuilder:

https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication

You can also use RESTful services:

How to call RESTFUL services from GWT?

Community
  • 1
  • 1
Andrei Volgin
  • 40,755
  • 6
  • 49
  • 58
1

Thanx all for your suport . . i have got the answer for my question. i created a restfull web service using Jersey and called it using the following code in my gwt app engine application:

ClientConfig config = new DefaultClientConfig();
Client client = Client.create(config);
WebResource service = client.resource(UriBuilder.fromUri("http://localhost:8080/de.vogella.jersey.first").build());
String obj=service.path("rest").path("bye").accept(MediaType.TEXT_PLAIN).get(String.class);

and the web application code is : package de.vogella.jersey.first;

import javax.ws.rs.*;

@Path("/bye")
public class Hello {

// This method is called if TEXT_PLAIN is request
@GET
@Produces(MediaType.TEXT_PLAIN)
public String sayPlainTextHello() {
  return "Hello it worked";
}

For Web Application Code refer to this link: http://www.vogella.com/articles/REST/article.html

рüффп
  • 5,172
  • 34
  • 67
  • 113
Ankit Singla
  • 198
  • 2
  • 15