使用 GroovyWS 实现 SSL 服务客户端时出现的问题[Groovy/Grails]
我是 GroovyWS 的新手。
我喜欢在 Grails 应用程序中使用 SSL Web 服务。到目前为止,我收集了以下一段代码
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 客户端吗?
提前致谢
I am new bie to GroovyWS.
I like to consume SSL webservice in my Grails Application. So far i have following piece of code collected from
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()
but it all end up with an exception
java.lang.NullPointerException
at groovyx.net.ws.cxf.SSLHelper.getLocalWsdlUrl(SSLHelper.java:253)
I want to know how can i get worked aforewritten piece of code ?
So far i have used GroovyWS
Is there any other way to implement WS client in Grails/Groovy ?
Thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此处的 Groovy JIRA 报告建议您的密钥库的密码可能不同。
The Groovy JIRA report here is suggesting that the password to your keystore may be different.