Showing posts from July, 2013

Remote service interaction with Versile and Groovy - Part 1

Versile is a compact but powerful technology for remote service interaction. I will write a few blog posts about using this technology with Groovy. In fact the examples presented should be applicable for other JVM scripting languages as well as pure Java - since Versile Java is the only library needed here.

Creating a class which methods can be exposed remotely is easy with Versile. Simply inherit the VExternal class and annotate the methods with the @Publish annotation:

class Svc extends VExternal {
    @Publish(show=true, ctx=false) public String hello(String name) {
return "hello "+name

A few more lines of code is needed to put this service on the air, but before we get to that, I'll show you how to connect to it and call the hello method remotely:

// Get remote object
proxy = VUrl.resolve("vop://localhost/")

// Call method on remote object
print proxy.hello("Peter")

That was easy? To be able to call the service we need to create a listener for VOP …