For SOAP, do we need to generate client stubs from WSDL?
<p>With SOAP, as with REST, am I safe in assuming that in the end all that the client does to call the web service is post some XML to an endpoint URL? If this is the case then is it required to use a tool like Axis or  wsimport to generate the client stub classes from a WSDL?</p>

<p>Is there anything wrong with skipping this step and just building the raw XML myself and doing an HTTP Post of that entire SOAP envelope?</p>

<p>Here is what I want to do in groovy.</p>

<pre><code> def myXml = "&lt;soapenv:Envelope&gt;" +
            "  &lt;soapenv:Body&gt;" +
            "    &lt;myservice:invoke&gt;" +
            "        &lt;username xsi:type=\"xsd:string\"&gt;$username&lt;/username&gt;" +
            "        &lt;apiKey xsi:type=\"xsd:string\"&gt;$apiKey&lt;/apiKey&gt;" +
            "    &lt;/myservice:invoke&gt;" +
            "  &lt;/soapenv:Body&gt;&lt;/soapenv:Envelope&gt;"

 HttpMethod method = new PostMethod('https://myservice.javaguy.com/Service.asmx')

method.setRequestEntity(new StringRequestEntity(myXml))
method.setRequestHeader('Content-type','text/xml')
def responseCode = httpClient.executeMethod(method)
</code></pre>