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, 
"[email protected]",
                                                
"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...@...]
> Envoyé : mardi 16 juin 2009 10:39
> À : disc...@...
> 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...@...",
> >
> "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&dsMessageId=23623
> 80
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2362581
>
>
> View message @ 
> http://n2.nabble.com/Restlet-GWT---ChallengeResponse-null-on-server-side-tp3069731p3088538.html
> To start a new topic under Restlet Discuss, email 
> [email protected]
> To unsubscribe from Restlet Discuss, click here.
>


-- 
View this message in context: 
http://n2.nabble.com/Restlet-GWT---ChallengeResponse-null-on-server-side-tp3069731p3088657.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2362589

Reply via email to