/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package wa;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

/**
 *
 * @author Fulvio
 */
@WebService()
public class WestAirlinesWS {

    /**
     * Web service operation
     */
    @WebMethod(operationName = "getAvailability")
    public String getAvailability(@WebParam(name = "source")
    String source, @WebParam(name = "destination")
    String destination, @WebParam(name = "seats")
    int seats) {
        if (destination.equals("roma"))
            return "ok";
        else
            return "no";
    }

    /**
     * Web service operation
     */
    @WebMethod(operationName = "book")
    public String book(@WebParam(name = "name")
    String name, @WebParam(name = "source")
    String source, @WebParam(name = "destination")
    String destination, @WebParam(name = "seats")
    int seats) {
        //TODO write your implementation code here:
        return "WA Ticket";
    }

}
