java is shown as follows:
package org.airalliance.northair;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
@Stateless()
@WebService()
public class NorthAirWS {
/**
* Web service operation
*/
@WebMethod(operationName = "processItinerary")
public String processItinerary(@WebParam(name = "firstName")
String firstName, @WebParam(name = "lastName")
String lastName, @WebParam(name = "source")
String source, @WebParam(name = "destination")
String destination, @WebParam(name = "travelDate")
String travelDate, @WebParam(name = "seatPreference")
String seatPreference, @WebParam(name = "foodPreference")
String foodPreference, @WebParam(name = "guestID")
String guestID, @WebParam(name = "seqID")
int seqID) {
//TODO write your implementation code here:
return "Processed Reservation";
}
Now we have a simple web service with one operation. In order to add this web
service as a partner link, we need to deploy this web service in GlassFish Application
Server. Right-click the EJB module and select Undeploy and Deploy to deploy the
project to the default server.
When you deploy a Web Service to a web container, NetBeans IDE lets you test the
web service to see if it functions as you expect. The tester application, provided by
the GlassFish Application Server, is integrated into the IDE for this purpose.
Pages:
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191