使用GroovyWS实现SSL服务客户端的问题[Groovy / Grails]

时间:2011-07-22 07:22:21

标签: grails groovy groovyws

我是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客户端?

提前致谢

1 个答案:

答案 0 :(得分:0)

Groovy JIRA报告here表明您的密钥库的密码可能不同。