Slide 40
Slide 40 text
Chapter 3: RPC and Ajax
Choice 3: resty-gwt
Uses classical JAX-RS and client.
client:
PizzaService service = GWT.create(PizzaService.class);
service.order(order, new MethodCallback() {
public void onSuccess(Method method, OrderConfirmation response) { … }
public void onFailure(Method method, Throwable exception) { … }
});
server:
public interface PizzaService extends RestService {
@POST
@Path("pizzaorders")
public void order(PizzaOrder request, MethodCallback callback);
}