I'm going through the first examples from the new Java Web Services: Up and Running book. I tried to go through the SOAP client example for Java on page 13, but in Groovy.
So here is my Groovy shell 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)
But this fails with this error:
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}
I do not understand this, since Groovy tells me this method with that signature does indeed exist:
groovy:000> Service.class.getMethods().each {println it}
public static javax.xml.ws.Service \
javax.xml.ws.Service.create(java.net.URL,javax.xml.namespace.QName)
...
Does anybody know what I am doing wrong here?