[groovy-user] groovyws & ssl?

29 views
Skip to first unread message

Scott Vlaminck

unread,
Apr 20, 2009, 2:45:08 AM4/20/09
to us...@groovy.codehaus.org
Hi,

I'm having problems with groovyws. The latest snapshot fixed my first
problem (NPE in initialize()
-http://www.nabble.com/groovyws-td22854790.html)

The wsdl I'm pointing to is using SSL, as is the webservice call.
Seems like the port is not being set. Here's the first part of the
stack trace:

java.lang.IllegalArgumentException: port out of range:-1
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:350)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:69)
at groovyx.net.ws.cxf.SSLHelper.getLocalWsdlUrl(SSLHelper.java:231)
at groovyx.net.ws.WSClient.initialize(WSClient.java:91)
at groovyx.net.ws.IWSClient$initialize.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)


Based on that, I tried to set the port using setSSLProperties(['port',
'443']) on my WSClient proxy, but that caused a NPE:

java.lang.NullPointerException
at groovyx.net.ws.AbstractCXFWSClient.getServiceNamespaceURI(AbstractCXFWSClient.java:132)
at groovyx.net.ws.AbstractCXFWSClient.invokeMethod(AbstractCXFWSClient.java:71)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:43)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:124)


Any pointers appreciated.

Thanks,
Scott

-------------------------------------------------
Scott Vlaminck // sc...@refactr.com
Refactr LLC // http://refactr.com
mobile // 612-386-9382
-------------------------------------------------

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Scott Vlaminck

unread,
Apr 20, 2009, 9:43:05 AM4/20/09
to us...@groovy.codehaus.org
I figured it out. Need to add ":443" in the url passed to the WSClient
constructor.

Thanks,
Scott

-------------------------------------------------
Scott Vlaminck // sc...@refactr.com
Refactr LLC // http://refactr.com
mobile // 612-386-9382
-------------------------------------------------

sana

unread,
Jan 9, 2012, 1:42:00 PM1/9/12
to us...@groovy.codehaus.org
Hi,
I saw your post.
http://groovy.329449.n5.nabble.com/groovyws-amp-ssl-td366795.html

how you got your code working? i am trying to get it from a week but all the
time null pointer exception.
here is my code-
<code> def wsTest = {
println "Before calling Ws method>>>";
def proxy =
getProxy("https://devora11.gryphon.priv:443/axis2/services/GDXAppWS?wsdl",
this.class.classLoader)


println "Proxy**"+proxy

proxy?.initialize()

{println proxy.isSpecifiedSQLAlive()
}

}

getting error-
java.lang.NullPointerException

at
groovyx.net.ws.AbstractCXFWSClient.invokeMethod(AbstractCXFWSClient.java:87)

at
com.ggw.LoadController$_closure2$$ENLX7mxK.doCall(LoadController.groovy:137)

at
org.grails.plugin.resource.DevModeSanityFilter.doFilter(DevModeSanityFilter.groovy:26)

at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
</code>
Please help.
Sana

--
View this message in context: http://groovy.329449.n5.nabble.com/groovyws-ssl-tp366795p5132079.html
Sent from the groovy - user mailing list archive at Nabble.com.

Reply all
Reply to author
Forward
0 new messages