Grails - 调用Web服务时没有类def def错误

更新以反映更改后的新错误消息 你好,我试图从Grails调用一个Web服务,但一直在运行错误。 这是我班级的样子:
import groovyx.net.ws.WSClient
...
    def serviceUrl = "http://www.w3schools.com/webservices/tempconvert.asmx?WSDL"
    def proxy = new WSClient(serviceUrl.toString(), this.class.classLoader)
    serviceResult = proxy.FahrenheitToCelsius("80")
    println serviceResult
... 我遇到grails运行时异常: 错误500:执行controller [myPackage.myController]的action [index]导致异常:java.lang.NoClassDefFoundError:org / apache / cxf / endpoint / Client 一直在尝试排除故障,但一直无法找到任何有用的资源。任何有关如何补救的帮助或建议将不胜感激。 谢谢。     
已邀请:
你错过了
new
运算符它看起来像:
def proxy = new WSClient(serviceUrl.toString(), this.class.classLoader)
    

要回复问题请先登录注册