我是GroovyWS的新手。
我喜欢在Grails应用程序中使用SSL webservice。到目前为止,我有以下从
收集的代码 def myServiceUrl ="https://myserverurl/services/myservicename"
Map<String, String> mapClient = [
"https.keystore":"",
"https.keystore.pass":"",
"https.truststore":"",
"https.truststore.pass":"client"
]
def proxy = new WSClient(myServiceUrl +"?wsdl", this.class.classLoader)
proxy.setSSLProperties(mapClient)
proxy.setBasicAuthentication("username","password")
proxy.initialize()
但最终都会出现异常
java.lang.NullPointerException
at groovyx.net.ws.cxf.SSLHelper.getLocalWsdlUrl(SSLHelper.java:253)
我想知道如何处理上述代码? 到目前为止,我已经使用了GroovyWS 有没有其他方法可以在Grails / Groovy中实现WS客户端?
提前致谢