You can develop your web service using a groovy script and/or a groovy class. Imagine, we want to publish a web service performing simple arithmetics. First, we have to write the business class implementing the basic operations. In our example, we chose to just implement simple add and square operations. Note that this class is quite generic and could be use locally.
Then we have to publish this service. In order to do so, we use WSServer and create one so called node linking our class with a URL.
That's all !