title: Passing Parameter to Rest Client
body: <p>In my gwt application, I've implemented this method:</p>
  
  <pre><code>@Service("carService")
  @Path("/cars")
  @Scope("request")
  public class CarServiceImpl implements CarService {
  
       @Autowired
       private CarDAO carDAO;
  
       @Override
       @GET @Path("{type}/{start}/{end}")
       @Produces({MediaType.APPLICATION_XML})
       public List&lt;Car&gt; findByType(@PathParam("type") CarType type, 
                       @PathParam("start") Date start, 
                       @PathParam("end") Date end) {
       return carDAO.findByType(type, start, end);
       }
  </code></pre>
  
  <p>where findByType is a method in the carDAO asking to databases (in a peer-to-peer architecture) for available cars to rent. 
  Now I have to implement its rest client and I have:</p>
  
  <p>package it.unibo.ronf.server.rest;</p>
  
  <pre><code>import java.util.Date;
  import java.util.List;
  
  import com.sun.jersey.api.client.Client;
  import com.sun.jersey.api.client.ClientResponse;
  import com.sun.jersey.api.client.GenericType;
  import com.sun.jersey.api.client.UniformInterfaceException;
  import com.sun.jersey.api.client.WebResource;
  
  import it.unibo.ronf.shared.entities.Car;
  import it.unibo.ronf.shared.entities.CarType;
  
  public class ClientRestCars {
  
  public List&lt;Car&gt; findAvailableCar(CarType type, Date start, Date end) {
  
      Client client = Client.create();
  
      WebResource webResource = client
              .resource("http://localhost:8080/RONF/rest/cars");
  
  
  
  }
  
  }
  </code></pre>
  
  <p>and I don't know how to go on, how to pass the parameters to the url and get the list of cars as results.
  Can help?</p>