Created
December 6, 2010 22:56
-
-
Save jpertino/731156 to your computer and use it in GitHub Desktop.
groovy ws simple server and client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Grab('org.codehaus.groovy.modules:groovyws:0.5.2') | |
def 'groovyws'(){} | |
class SyncService { | |
def getFoo() { | |
"bar. i mean, foo" | |
} | |
} | |
new groovyx.net.ws.WSServer().with { | |
setNode "SyncService", "http://localhost/SyncService" | |
start() | |
new groovyx.net.ws.WSClient( | |
"http://localhost/SyncService?wsdl", | |
this.class.classLoader).with { | |
initialize() | |
println getFoo() | |
} | |
stop() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment