public static void startJetty() throws Exception {
int port = FreePortScanner.getFreePort();
baseUrl = "http://localhost:" + port;
jettyServer = new Server(port);
Context jettyContext = new Context(jettyServer, "/");
jettyContext.addServlet(new ServletHolder(new EchoSoapServlet()), "/soap/echo");
jettyContext.addServlet(new ServletHolder(new SoapReceiverFaultServlet()), "/soap/receiverFault");
jettyContext.addServlet(new ServletHolder(new SoapSenderFaultServlet()), "/soap/senderFault");
jettyContext.addServlet(new ServletHolder(new NoResponseSoapServlet()), "/soap/noResponse");
jettyContext.addServlet(new ServletHolder(new AttachmentsServlet()), "/soap/attachment");
jettyContext.addServlet(new ServletHolder(new ErrorServlet(404)), "/errors/notfound");
jettyContext.addServlet(new ServletHolder(new ErrorServlet(500)), "/errors/server");
jettyServer.start();
}