Java Reference
In-Depth Information
org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
import org.junit.Test;
import
com.packtpub.as7development.chapter8.model.Seat;
import
com.packtpub.as7development.chapter8.webservice.*;
public class TicketWebServiceIT {
@Test
public void testSOAP() {
JaxWsProxyFactoryBean factory = new
JaxWsProxyFactoryBean();
factory.setServiceClass(TicketSOAPServiceItf.class);
factory.setAddress("http://localhost:8080/
ticket-agency-ws/TicketWebService?wsdl");
factory.getInInterceptors().add(new
LoggingInInterceptor());
factory.getOutInterceptors().add(new
LoggingOutInterceptor());
TicketSOAPServiceItf infoService =
(TicketSOAPServiceItf) factory.create();
System.out.println("Got the Service:
"+infoService);
infoService.bookSeat(1);
List<Seat> list =
infoService.getSeats();
dumpSeatList(list);
Search WWH ::




Custom Search