Java Reference
In-Depth Information
This simply means that if we were to deploy our former example, the HTTP GET method,
http://host/example/rest/users would trigger our getUser business meth-
od, while the same URL will place a request through the handlePOSTRequest meth-
od using a POST request.
Adding REST to our ticket example
With all the configurations in place, we can now add a simple REST web service to our
Ticket Web Service project, which will provide the same functionalities as our
SOAP web service.
So add a new class to your project and name it SeatsResource . The code for this is as
package com.packtpub.wflydevelopment.chapter7.boundary;
public class SeatsResource {
private TheatreBooker theatreBooker;
private TheatreBox theatreBox;
public Collection<SeatDto> getSeatList() {
return theatreBox.getSeats()
Search WWH ::

Custom Search