title: Publish JAX-WS endpoint with embedded Jetty 7
body: <p>Can anybody help with this?</p>
  
  <p>I want to use an embedded Jetty 7 as Endpoint. This is what I tried:</p>
  
  <pre><code>public class MiniTestJetty {
  
  @WebService(targetNamespace = "http")
  public static class Calculator {
  
      @Resource
      WebServiceContext context;
  
      public int add(int a, int b) {
          return a + b;
      }
  }
  
  
  public static void main(String[] args) throws Exception {
      int port = 8080;
      Server server = new Server(port);
  
      Calculator calculator = new Calculator();
      Endpoint.publish("http://localhost:" + port + "/calc", calculator);
  
      server.start();
      server.join();
  }
  </code></pre>
  
  <p>}</p>
  
  <p>But I cannot see whether this really uses Jetty instead of the default sun HttpServer.</p>
  
  <p>One blog mentioned</p>
  
  <pre><code> System.setProperty("com.sun.net.httpserver.HttpServerProvider",
         "org.mortbay.jetty.j2se6.JettyHttpServerProvider");
  </code></pre>
  
  <p>But there doesn't seems to be such HttpServerProvider in Jetty 7.</p>
  
  <p>Thanks for any help, Axel.</p>