Max,
I suggest that you upgrade to Restlet 1.1.5. This might fix your issue. Otherwise, which browser and OS are you using on the client side? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ <http://www.restlet.org/> http://www.restlet.org Noelios Technologies ~ Co-founder ~ <http://www.noelios.com/> http://www.noelios.com De : mstricker [mailto:[email protected]] Envoyé : mardi 16 juin 2009 22:28 À : [email protected] Objet : Re: Restlet GWT - ChallengeResponse null on server side Hi, thanks for your reply. I waited the whole day. Here my configuration: Apache Tomcat/6.0.18 JVM Version 1.6.0_07-b06 restlet 1.1.1 I followed the instructions from the wiki, and my test code is realy simple at the moment: on server side i simply log getRequest().getChallengeResponse() which is null the GWT client is also realy simple and is basically copied from the wiki: org.restlet.gwt.data.Request request = new org.restlet.gwt.data.Request( Method.GET, "http://cmydomain.com:8080/myServicet/authenticate"); ChallengeResponse authentication = new ChallengeResponse( ChallengeScheme.HTTP_BASIC, "t...@... <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3088657&i=0> ", "098f6bcd4621d373cade4e832627b4f6"); request.setChallengeResponse(authentication); System.out.print(request); Client client = new Client(Protocol.HTTP); client.handle(request, new Callback() { @Override public void onEvent(Request request, Response response) { System.out.println(response.getEntity().getText()); } }); I test the GWT code using the hosted mode from my local machine, the server part is deployed to a tomcat instance on the web. Any ideas? Because I can't proceed without having solved this problem first. this is the output from the sample code above: The server is running at http://localhost:8080/ org.restlet.gwt.data.requ...@10751b6starting the HTTP client <html> <head> <title>Status page</title> </head> <body> <h3>The request requires user authentication</h3><p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.2">here</a>.<br> Please continue your visit at our <a href="/">home page</a>. </p> </body> </html> Max Am 16.06.2009 um 22:08 schrieb jlouvel (via Nabble): Hi Max, No specific idea, this should work. Could you share your configuration details? (Restlet version, JVM, browser, etc.) Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : mstricker [mailto:m...@... <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3088538&i=0> ] Envoyé : mardi 16 juin 2009 10:39 À : disc...@... <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3088538&i=1> Objet : Re: Restlet GWT - ChallengeResponse null on server side Any ideas? It is urgent. Could it be because my RESTlet is deployed to a server and the GWT client runs on localhost and there are some security constraints? mstricker wrote: > > Hi, > > I have never worked with GWT or Restlet GWT but now have the need to > consume a simple Restlet service from GWT. > I downloaded the RestletGWTSimpleExample.zip and tried to learn from it. > To autheticate against the service i use this snippet: > > // Send an authenticated request using the Basic authentication > // scheme. > org.restlet.gwt.data.Request request = new > org.restlet.gwt.data.Request( > Method.GET, > "http://myserver:8080/myservice/authenticate"); > ChallengeResponse authentication = new ChallengeResponse( > ChallengeScheme.HTTP_BASIC, "te...@... <http://n2.nabble.com/user/SendEmail.jtp?type=node&node=3088538&i=2> ", > "098f6bcd4621d373cade4e832627b4f6"); > request.setChallengeResponse(authentication); > new Client(Protocol.HTTP).handle(request, new Callback() { > @Override > public void onEvent(Request request, Response response) { > System.out.println(response.getEntity().getText()); > } > }); > > this results always in a unauthenticated status code because on the > Restlet server > getRequest().getChallengeResponse() is always null. > Is this a known issue or am I doing something wrong? > -- View this message in context: http://n2.nabble.com/Restlet-GWT---ChallengeResponse-null-on-server-side-tp3 069731p3085134.html Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 <http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23623> &dsMessageId=23623 80 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447 <http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2362581> &dsMessageId=2362581 _____ View this message in context: Re: <http://n2.nabble.com/Restlet-GWT---ChallengeResponse-null-on-server-side-tp3069731p3088657.html> Restlet GWT - ChallengeResponse null on server side Sent from the Restlet <http://n2.nabble.com/Restlet-Discuss-f1400322.html> Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2362592

