Hi, I'm using restlet 2.0rc4 on BSD, and run into some interesting problem. I'm trying to make http request using restlet client from inside restlet server code (inside ServerResource @post method).
Code snippet is as following: ------------------------ InetAddress yahoohost = InetAddress.getByName("www.yahoo.com"); logger.log(Level.INFO, "--- Yahoo address: " + yahoohost.toString()); logger.log(Level.INFO, "--- Reachability: " + yahoohost.isReachable(3000)); ClientResource client = new ClientResource("http://www.yahoo.com"); logger.log(Level.INFO, "HTTP GET Resp: " + client.get().getText()); ----------------------- And I got the following error: ------------------------- Oct 28, 2010 12:13:53 AM Crossweb.CWManagerCouchDB validateSession INFO: --- Yahoo address: www.yahoo.com/98.137.149.56 Oct 28, 2010 12:13:53 AM Crossweb.CWManagerCouchDB validateSession INFO: --- Reachability: true Oct 28, 2010 12:13:53 AM org.restlet.engine.component.ClientRouter getNext WARNING: The protocol used by this request is not declared in the list of client connectors. (HTTP/1.1) Not Found (404) - The server has not found anything matching the request URI at org.restlet.resource.ClientResource.handle(ClientResource.java:748) at org.restlet.resource.ClientResource.handle(ClientResource.java:660) -------------------------- You can see that my system solved dns correctly and www.yahoo.com was reachable from within ServerResource class. But somehow it said "no matching the request URI" I tried the exact same code as standalone class, and it worked perfectly as client and I got a bunch of yahoo frontpage back. Is there anything I miss? --Patrick ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2676944