title: How to do a SOAP Web Service call from Java class?
body: <p>I'm relative new to the webservices world and my research seems to have confused me more than enlighten me, my problem is that I was given a library(jar) which I have to extend with some webservice functionality.</p>
  
  <p>This library will be shared to other developers, and among the classes in the jar will be classes that have a method which calls a webservice (that essentially sets an attribute of the class, does some business logic, like storing the object in a db, etc and sends back the object with those modifications). I want to make the call to this service as simple as possible, hopefully as simple so that the developer using the class only need to do.</p>
  
  <pre><code>Car c = new Car("Blue");
  c.webmethod();
  </code></pre>
  
  <p>I have been studying JAX-WS to use on the server but seems to me that I don't need to create a <code>wsimport</code> in the server nor the <code>wsimport</code> on the client, since I know that both have the classes, I just need some interaction between classes shared in both the server and the client. How do you think makes sense to do the webservice and the call in the class?</p>