package com.blogspot.diegopacheco.groovy.rest.client; import groovy.util.GroovyTestCase import com.sun.grizzly.http.SelectorThread; import com.sun.grizzly.tcp.Adapter; import com.sun.jersey.api.container.ContainerFactory; import com.sun.jersey.api.container.grizzly.GrizzlyServerFactory; import com.sun.jersey.api.client.Client; import com.sun.jersey.api.client.WebResource; import java.io.IOException; import java.net.URI; import java.util.HashMap; import java.util.Map; import javax.ws.rs.core.UriBuilder; import com.blogspot.diegopacheco.groovy.rest.server.*; /** * * Client Groovy que consome o WS-RESt feito em Groovy. * * @autor Diego Pacheco * @since 05/01/2009 * @version 1.0 * **/ ws = Client.create().resource(UriBuilder.fromUri("http://localhost/").port(10101).build()); println "Retorno do WS-REST foi 1: " + ws.path("groovy-pojo").get(String.class) println "Retorno do WS-REST foi 2: " + ws.path("groovy-pojo/diego").get(String.class)