Given the number of times I've seen this question asked (both on this list and here at my company), it seems to me that the configuring of connectors should be directly addressed in the tutorial (since this is where most people seem to start when trying to get something running).
--Chuck -----Original Message----- From: Thierry Boileau [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 10, 2007 10:59 AM To: [email protected] Subject: Re: Classpath or config? Hello Donald, this is a good remark. Your classpath need to be updated with some other jars. The Restlet framework is composed of 3 parts : restlet API, NRE implementation of this API and some extensions. Some of them are called "connectors" because they are responsible of linking two components on the network. You can find server connectors (for example, an HTTP connectors that get requests from clients delegate the call to a restlet, component, etc and give the response back) and client connectors that initiate requests to a server. Because you make some HTTP requests, you need to add one client HTTP connector. Please go to this page in order to make your choice between the two provided by the current delivery and add the right jars : http://www.restlet.org/documentation/1.0/connectors Best regards, Thierry Boileau > Hi, > > I am just setting up Restlet at home. (Restlet-1.0rc6.zip) I am just > playing around at the moment and I have converted SimpleClient.java into a Junit test. > I have com.noelios.restlet.jar and org.restlet.jar in my classpath but get this warning. > (Using jre1.5.0_10). > > 10/04/2007 23:47:58 com.noelios.restlet.Engine createHelper > WARNING: No available client connector supports the required protocols: HTTP . Please add the JAR of a matching connector to your classpath. > > Can someone tell me is this classpath or a config issue? > > Regards > Donald. > > public class SimpleClientTest extends TestCase { > > public void testSimpleForm() throws Exception { > // Prepare the REST call. > Request request = new Request(); > > // Identify ourselves. > request.setReferrerRef("http://www.foo.com/"); > > // Target resource. > request.setResourceRef("http://127.0.0.1:9876/test"); > > // Action: Update > request.setMethod(Method.PUT); > > Form form = new Form(); > form.add("name", "John D. Mitchell"); > form.add("email", "[EMAIL PROTECTED]"); > form.add("email2", "[EMAIL PROTECTED]"); > request.setEntity(form.getWebRepresentation()); > > System.out.println("client: one!"); > > // Prepare HTTP client connector. > Client client = new Client(Protocol.HTTP); > System.out.println("client: two!"); > > client.getLogger().log(Level.INFO, "client: two!"); > // Make the call. > Response response = client.handle(request); > client.getLogger().log(Level.INFO, "client: three!"); > > if (response.getStatus().isSuccess()) { > client.getLogger().log(Level.INFO, "client: four!"); > // Output the response entity on the JVM console > response.getEntity().write(System.out); > System.out.println("client: success!"); > } else { > System.out.println(response.getStatus().getDescription()); > fail("client: failure!"); > } > } > } > > >

