title: How to do a call through a javax.xml.ws.Service
body: <p>Created a new standard java 7 project in Eclipse and have successfully managed to get an instance of a <code>javax.xml.ws.Service</code> like so:</p>
  
  <pre><code>  String wsdlURL = "http://example.com:3000/v1_0/foo/bar/SomeService?wsdl";
    String namespace = "http://foo.bar.com/webservice";
    String serviceName = "SomeService";
    QName serviceQN = new QName(namespace, serviceName);
  
    Service service = Service.create(new URL(wsdlURL), serviceQN);
  </code></pre>
  
  <p>This runs fine in a main method, so as far as I can see, that part works. But I can't figure out how to actually use it. In SoapUI I call this same service with a request which looks like the following:</p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://foo.bar.com/webservice"&gt;
     &lt;soapenv:Header/&gt;
     &lt;soapenv:Body&gt;
        &lt;web:SomeWebServiceRequest acAccountName="name" acAccountPassword="password"&gt;
           &lt;SomeRequest&gt;
              &lt;id&gt;012345678901234&lt;/id&gt;
              &lt;action&gt;Fix&lt;/action&gt;
           &lt;/SomeRequest&gt;
        &lt;/web:SomeWebServiceRequest&gt;
     &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>How can I do the same request in Java? My goal is that I have a long list of these <code>id</code>s, and I need to run a request like that for each of them. Doing it manually in SoapUI is a bit annoying, so I'd like to automate it with a simple Java console application.</p>