Skip to content

Instantly share code, notes, and snippets.

@jpertino
Created December 6, 2010 22:56
Show Gist options
  • Save jpertino/731156 to your computer and use it in GitHub Desktop.
Save jpertino/731156 to your computer and use it in GitHub Desktop.
groovy ws simple server and client
@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