Hi Rob, yes exactly this is the problem at the moment.
I think I didn't explain myself very well because of the language barrier. Any help is appreciated. Max Am 17.06.2009 um 00:18 schrieb Rob Heittman (via Nabble): > Hi Max, > > I'm having some trouble understanding your use case too. Sorry if > maybe it is just a language problem. Let me try to repeat this to > see if I understand. > > - You have already created a Restlet service which is out on the web > somewhere, say http://publicserver/restlet/service. > > - You need to create a client application, using GWT, which will > consume this Restlet service. > > Once you compile your GWT application to Javascript, if you install > the resulting HTML and JS at http://publicserver/gwt, it will be > able to access the service, because it is on the same server. > > However, when you are running in GWT Hosted Mode for debugging > purposes, against your local GWT Hosted Mode Tomcat server at > http://localhost:8888 > , you can not access the service due to sandbox restrictions, > because it is on http://publicserver instead. > > If so, you can work around this using Restlet's Redirector feature, > and org.restlet.ext.gwt or org.restlet.ext.servlet. In hosted mode, > your development client will make requests to > http://localhost:8888/some-restlet-route > and Restlet will forward them to the real server on > http://publicserver/restlet/service > . > > I'm not sure if this is what you're trying to do, but if it is let > me know and I can walk you through this in more detail. > > - Rob > > On Tue, Jun 16, 2009 at 6:03 PM, mstricker <m...@...> wrote: > Hi, > > I upgraded both my server & GWT libs to 1.1.5 as you suggested. > I use Firefox 3 as browser under Windows XP and Mac OS X Leopard. > The updated not fix my issue but I think I know the cause, > > I think it is because of the security restrictions ( RPC calls can > be made only to the same host). > I had a look at the deployment instruction from your wiki but I > think it does not correspond to my situation. > > I have a Restlet service finished and deployed which is used by > mobile devices as clients. > Now I have to enable 2-3 functionalities over the web, and I am > forced to use GWT, altough I havent used it til now. > So I think i do not need the "server" part of GWT, since my service > is ready to be consumed. > I thought about using restlet.gwt to consume it and display the > results. But this does not work > since I cannot deploy the html files to my tomcat to have the same > url and can make the calls to the service. > How is such a sittuation going to be solved? > I assume something with apache/mod_proxy? Can someone guide me how > to solve it, > as I am not a sysadmin and cannot touch many things on the tomcat > instance. > > Thans for any advice > > Max > > Am 16.06.2009 um 22:35 schrieb jlouvel (via Nabble): > >> 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 >> Noelios Technologies ~ Co-founder ~ http://www.noelios.com >> >> >> >> De : mstricker [mailto:m...@...] >> Envoyé : mardi 16 juin 2009 22:28 >> >> >> À : disc...@... >> 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...@...", >> >> >> "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 this message in context: Re: Restlet GWT - ChallengeResponse >> null on server side >> Sent from the Restlet Discuss mailing list archive at Nabble.com. >> > > > View this message in context: Re: Restlet GWT - ChallengeResponse > null on server side > Sent from the Restlet Discuss mailing list archive at Nabble.com. > > > > View message @ > http://n2.nabble.com/Restlet-GWT---ChallengeResponse-null-on-server-side-tp3069731p3089182.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-tp3069731p3089379.html Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2362644

