Я пытаюсь создать класс веб-сервиса в src / groovy, но он выдает ошибку и жалуется, что веб-сервис не найден.Пожалуйста, помогите, почему я не вхожу в src / groovy.
import org.apache.cxf.transport.http.HTTPConduit
import org.grails.plugins.wsclient.service.WebService
class ConnectWebservice {
WebService webService ///it complains that not found.
def static wsHandleMap = [:]
def static handle
static def getProxy = {url->
def wsdlURL = url+"?wsdl"
def proxy = webService.getClient(wsdlURL) ////not get webService
proxy?.initialize()
proxy.metaClass.getCxfClient = { ->
delegate.client
}
// get client instance
def cxfClient = proxy.cxfClient
// create new endpoint url
URL newUrl = new URL(url)
// assign new created url to the client
cxfClient.getConduit().getTarget().getAddress().setValue(newUrl.toExternalForm());
//Extra: to set timeout, use:
proxy.client.conduit.clientSidePolicy.setReceiveTimeout(999)
proxy.client.conduit.clientSidePolicy.setConnectionTimeout(999)
//println proxy
return proxy
}