Groovy脚本:没有方法签名

时间:2018-10-22 20:16:15

标签: groovy

我收到以下错误,并感到困惑,因为它似乎可以很好地进行类型匹配(可能的解决方案与值):

groovy.lang.MissingMethodException: No signature of method: com.xxx.www.ci.yyy.GetRecords() is applicable for argument types: (com.xxx.www.ci.yyy$GetRecords) values: [com.xxx.www.ci.yyy$GetRecords@75e1a893]
Possible solutions: getRecords(com.xxx.www.ci.yyy$GetRecords)

脚本的一部分:

import com.xxx.www.ci.yyy
import com.xxx.www.ci.yyy.Get
import com.xxx.www.ci.yyy.GetRecords
import com.xxx.www.ci.yyy.GetRecordsResponse
import com.xxx.www.ci.yyy.GetKeys
import com.xxx.www.ci.yyy.GetKeysResponse

public class CIAdapter  implements Serializable{

 private def checkCI(event, PasswordAuthentication credentials) {
     yyy client = new yyy()     
     HttpTransportProperties.Authenticator basicAuthentication  = new HttpTransportProperties.Authenticator() 
     basicAuthentication. setUsername ( "user" ) 
     basicAuthentication. setPassword ( "pwd" )

    def getCI = new yyy.GetRecords()
    def resp = new yyy.GetRecordsResponse() 

    getCI.__encoded_query = "selection"
    resp = client.GetRecords(getCI)

    return resp
  }
}

我尝试了强制转换(即“ yyy.GetRecords getCI = new yyy.GetRecords()”),但结果相同。我正在转圈,所以一定很明显我在这里不见了。

谢谢!

1 个答案:

答案 0 :(得分:0)

错误:没有这样的功能

显然在这一行:

client.GetRecords(getCI)

因为在其他情况下,您无法通过参数调用GetRecords