title: How to create a JAS-WS client?
body: <p>On my quest to learn and understand Java web services I have made a very simple server, that adds two numbers, and I have created a <code>.war</code> file with it:</p>
  
  <p><strong>Server code:</strong></p>
  
  <pre><code>@WebService(serviceName = "CalculatorWS")
  @Stateless()
  public class CalculatorWS {
  
      @WebMethod(operationName = "add")
      public int add(@WebParam(name = "i") int i, @WebParam(name = "j") int j) {
          int k = i + j;
          return k;
      }
  }
  </code></pre>
  
  <p>I have created a <code>.war</code> file with that code and I deployed it using Jetty. Now the server is running at the address <code>http://localhost:8080/CalculatorWS/</code>.</p>
  
  <p>The next step on this quest is to create a Client, that can connect to that server as ask for information.</p>
  
  <p>I have followed <a href="https://netbeans.org/kb/docs/websvc/jax-ws.html" rel="nofollow">this NetBeans tutorial</a>, however, everything seems to be magic and I do not understand what to do. First because my main project is not in NetBeans, and seconds because this tutorial seems to be very "NetBeans dependent". </p>
  
  <p>How do I create a Java Client to connect and interact with my server without using Netbeans?</p>