Skip to content

Groovy-WSlite

Library for Groovy that provides no-frills SOAP and REST webservice clients.

No huge depencency list. Quite appealing.

From the front page:

@Grab(group='com.github.groovy-wslite', module='groovy-wslite', version='0.1')
import wslite.soap.*

def soapClient = new SOAPClient("http://www.webservicex.net/WeatherForecast.asmx")
def response = soapClient.send {
    version SOAPVersion.V1_2
    body {
        GetWeatherByZipCode(xmlns:"http://www.webservicex.net") {
            ZipCode("93657")
        }
    }
}

assert "SANGER" == response.GetWeatherByZipCodeResponse.GetWeatherByZipCodeResult.PlaceName.text()
assert 200 == response.http.statusCode
assert "OK" == response.http.statusMessage
assert "ASP.NET" == response.http.headers["X-Powered-By"]

Looks good. The Groovy/Grails webservices stack has been in need of a bit of love for a while, so it will be interesting to see how this develops.

Its probably worth keeping an eye on the topic at Nabble.

When I think about everything I went through with OSB to do much the same actual work…

Tags: ,

C, Java Enterprise Edition, JEE, J2EE, JBoss, Application Server, Glassfish, JavaServer Pages, JSP, Tag Libraries, Servlets, Enterprise Java Beans, EJB, Java Messaging Service JMS, BEA Weblogic, JBoss, Application Servers, Spring Framework, Groovy, Grails, Griffon, GPars, GAnt, Spock, Gradle, Seam, Open Source, Service Oriented Architectures, SOA, Java 2 Standard Edition, J2SE, Eclipse, Intellij, Oracle Service Bus, OSB