title: Unable to call a web service from Groovy
body: <p>I'm going through the first examples from the new <a href="https://rads.stackoverflow.com/amzn/click/com/059652112X" rel="nofollow noreferrer" rel="nofollow noreferrer">Java Web Services: Up and Running</a> book. I tried to go through the SOAP client example for Java on page 13, but in Groovy.</p>
  
  <p>So here is my Groovy shell code:</p>
  
  <pre><code>import javax.xml.namespace.QName
  import javax.xml.ws.Service
  import java.net.URL
  
  url = new URL("http://someURL?wsdl")
  qname = new QName("http://someURL", "SomeURLImplService")
  service = Service.create(url, qname)
  </code></pre>
  
  <p>But this fails with this error:</p>
  
  <pre><code>ERROR groovy.lang.MissingMethodException: No signature of method: \
  static javax.xml.ws.Service.create() is applicable for argument types: \
  (java.net.URL, javax.xml.namespace.QName) values: {http://someURL?wsdl, \
  {http://someURL}SomeURLImplService}
  </code></pre>
  
  <p>I do not understand this, since Groovy tells me this method with that signature does indeed exist:</p>
  
  <pre><code>groovy:000&gt; Service.class.getMethods().each {println it}
  public static javax.xml.ws.Service \
  javax.xml.ws.Service.create(java.net.URL,javax.xml.namespace.QName)
  ...
  </code></pre>
  
  <p>Does anybody know what I am doing wrong here?</p>