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.
Asked
Active
Viewed 2,885 times
2 Answers
1
You can use RPC and RequestBuilder:
https://developers.google.com/web-toolkit/doc/latest/DevGuideServerCommunication
You can also use RESTful services:

Community
- 1
- 1

Andrei Volgin
- 40,755
- 6
- 49
- 58
-
i am using restlet web service and calling it using request builder, but it returns response code 0. – Ankit Singla Nov 08 '12 at 11:15
-
this ibm example is going up of my head. – Ankit Singla Nov 08 '12 at 11:16
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