Re: Problem parsing Date header using GWT edition

2009-12-01 Thread Thierry Boileau
Helo Kelly,

thanks for your report (yes, this is a bug), this has been fixed a few 
days later and is available in the current snapshot.

Best regards,
Thierry Boileau

 I'm converting my project to use 2.0m6 and restlet gwt seems to be having 
 trouble parsing the Date header in the response from the server. After some 
 poking around, I traced the problem to this line in the translated 
 javascript: 

 parser = ($clinit_502() , $DateTimeFormat_0(new DateTimeFormat(), null, 
 defaultDateTimeConstants));

 The null argument passed to DateTimeFormat_0 is the problem. It should be a 
 parameter specifying the date format. 

 I believe the problem is in the DateUtils.java source file in the parse 
 method that has 2 parameters. There is a for loop that loops through each 
 specified date format. The format parameter is assigned inside a [ifndef gwt] 
 annotation block. This would cause the call to DateTimeFormat.getFormat 
 inside an [ifdef gwt] annotation section at line 235 to always be called with 
 an input parameter that is null and would seem to be why the javascript I 
 showed above is generated. This is what I would guess is the cause of what 
 I'm seeing. Anyone else had the problem? Am I correct that this is a bug?

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



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


Re: URI pattern handling

2009-12-01 Thread Thierry Boileau
Hello Vlatko,

when I declare the following routes (using the current snapshot of 
Restlet 2.0), I can get the subscriptions, publishers and channel 
correctly. That is to say:
 - http://localhost:8182/rms/channels/blah/blah/subscriptions; hits the 
subscriptions resource
 - http://localhost:8182/rms/channels/blah/blah/publishers; hits the 
publishers resource
 - http://localhost:8182/rms/channels/blah/blah/publishers/; hits the 
channel resource

// Attach subscriptions resource.
TemplateRoute subscriptionsRoute = 
router.attach(/rms/channels/{topicPath}/subscriptions, new Restlet() {
@Override
public void handle(Request request, Response response) {
response.setEntity(subscriptions, MediaType.TEXT_PLAIN);
}
});
subscriptionsRoute.getTemplate().setMatchingMode(Template.MODE_EQUALS);
MapString, Variable subscriptionsRouteVariables = 
subscriptionsRoute.getTemplate().getVariables();
subscriptionsRouteVariables.put(topicPath, new 
Variable(Variable.TYPE_ALL));

// Attach publishers resource.
TemplateRoute publishersRoute = 
router.attach(/rms/channels/{topicPath}/publishers, new Restlet() {
@Override
public void handle(Request request, Response response) {
response.setEntity(publishers, MediaType.TEXT_PLAIN);
}
});
publishersRoute.getTemplate().setMatchingMode(Template.MODE_EQUALS);
MapString, Variable publishersRouteVariables = 
publishersRoute.getTemplate().getVariables();
publishersRouteVariables.put(topicPath, new Variable(Variable.TYPE_ALL));

// Add channel route
TemplateRoute channelRoute = router.attach(/rms/channels/{topic}, new 
Restlet() {
@Override
public void handle(Request request, Response response) {
response.setEntity(channel, MediaType.TEXT_PLAIN);
}
});
channelRoute.getTemplate().setMatchingMode(Template.MODE_EQUALS);
MapString, Variable channelRouteVariables = 
channelRoute.getTemplate().getVariables();
channelRouteVariables.put(topic, new Variable(Variable.TYPE_ALL));


Does this help you?

Best regards,
Thierry Boileau

 Hi Thierry!

 I tried as you suggested:
 // Attach subscriptions resource.
 Route subscriptionsRoute = 
 router.attach(/rms/channels/{topicPath}/subscriptions, 
 SubscriptionsResource.class);
 
 subscriptionsRoute.getTemplate().setMatchingMode(Template.MODE_EQUALS);
 MapString, Variable subscriptionsRouteVariables = 
 subscriptionsRoute.getTemplate().getVariables();
 subscriptionsRouteVariables.put(topicPath, new Variable(Variable.TYPE_ALL));
 
 // Attach publishers resource.
 Route publishersRoute = router.attach(/rms/channels/{topicPath}/publishers, 
 PublishersResource.class);
 
 publishersRoute.getTemplate().setMatchingMode(Template.MODE_STARTS_WITH);
 MapString, Variable publishersRouteVariables = 
 publishersRoute.getTemplate().getVariables();
 publishersRouteVariables.put(topicPath, new Variable(Variable.TYPE_ALL));

 But still does not work. I get the same problem. No idea why. I could try to 
 add one more route then containing subscriptions/. Then I guess it should 
 work, but it will be more like a hack...



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


RE: Restlet translated in CIL (dotNet) with IKVM

2009-12-01 Thread Jerome Louvel
Hello Xavier,

 

IKVM looks like a great tool indeed. I would also be interested to learn how
well it works with Restlet. I’ve added a related comment to this RFE:

 

“Port to .NET platform”

http://restlet.tigris.org/issues/show_bug.cgi?id=106

 

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 : xavier.meh...@gmail.com [mailto:xavier.meh...@gmail.com] De la part de
Xavier Méhaut
Envoyé : mardi 1 décembre 2009 11:41
À : discuss@restlet.tigris.org
Objet : Restlet translated in CIL (dotNet) with IKVM

 

Hello,
I would like to knwo if someone has already tried to compile restlets into
CIL (dotNet) with IKVM? Is so, it would open Restlets to the dotnet world on
the server side without a lot of pain.
regards
Xavier

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

Re: Restlet translated in CIL (dotNet) with IKVM

2009-12-01 Thread Xavier Méhaut
It is a project which has been ongoing since 2004, and the developer is
clever. For information DB4O use it for working on dotNet too.
regards
Xavier

2009/12/1 Jerome Louvel jerome.lou...@noelios.com

  Hello Xavier,



 IKVM looks like a great tool indeed. I would also be interested to learn
 how well it works with Restlet. I’ve added a related comment to this RFE:



 “Port to .NET platform”

 http://restlet.tigris.org/issues/show_bug.cgi?id=106



 Best regards,
 Jerome Louvel
 --
 Restlet ~ Founder and Lead developer ~ http://www.restlet.org
 Noelios Technologies ~ Co-founder ~ http://www.noelios.com









 *De :* xavier.meh...@gmail.com [mailto:xavier.meh...@gmail.com] *De la
 part de* Xavier Méhaut
 *Envoyé :* mardi 1 décembre 2009 11:41
 *À :* discuss@restlet.tigris.org
 *Objet :* Restlet translated in CIL (dotNet) with IKVM



 Hello,
 I would like to knwo if someone has already tried to compile restlets into
 CIL (dotNet) with IKVM? Is so, it would open Restlets to the dotnet world on
 the server side without a lot of pain.
 regards
 Xavier


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

Data Services Ext for Android?

2009-12-01 Thread Luiz Alberto
I had downloaded Restlet for Android, M6, and not found 
org.restlet.ext.dataservices extension. I'snt supported? Will implement in 
future versions? Can I use Java DataServices extensions directed in Android?

Thanks all and sorry by bad english.

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


Re: HTTPS with Tomcat

2009-12-01 Thread Dustin N. Jenkins
Thanks, Bruno.

I am using the Client certificate authentication method.  It does look 
like the best way to do it is to place a ChallengeAuthenticator in front 
of my resource to ensure there is Certifiate authorization.  Does that 
sound right?

Thank you,
Dustin



Bruno Harbulot wrote:
 Hi Dustin,

 If you're running within Tomcat (or other servlet containers), it's 
 Tomcat that deals with the SSL connector, not the Restlet connector.
 Therefore, this setup has nothing to do with what's on the Restlet wiki 
 regarding SslContextFactories (which are only for connections with a 
 direct connector in Restlet). You should follow the Tomcat SSL 
 documentation for this instead.

 If you want to use client-certificate authentication, the Servlet 
 connector (of Restlet) relays the certificate chain (same as with the 
 other connectors), so you can get it from the 
 org.restlet.https.clientCertificates attribute in the Request: this is 
 a List of certificates (whereas javax.servlet.request.X509Certificate 
 is an array in Servlets).

 Best wishes,

 Bruno.

 Dustin N. Jenkins wrote:
   
 I'm using Java 1.6, RESTlet 2.0M6, Tomcat 6.0.20, on a Linux system.

 My Tomcat runs a Connector on port 8443 to support HTTPS connections, 
 and my Apache configuration is proxying to it.  It's not using the AJP, 
 but just with Redirects.

 I'm not sure how to setup SSL Certificates with my REST application.  
 For the BASIC authentication with HTTP, one would use a ChallengeGuard, 
 for example, but with HTTPS, do we still need a Guard in place to check 
 for certificates?

 The setup has me confused too.  See here:
 http://wiki.restlet.org/docs_2.0/13-restlet/28-restlet/153-restlet.html

 Do I need to configure a Server bean to look on the 8443 port that 
 Tomcat already has open?  I assume a SSLContextFactory of some kind 
 needs to be configured.

 Has anyone got HTTPS Certificates working?  Is there a guide for it?

 Thanks,
 Dustin
 

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

-- 


Dustin N. Jenkins | Tel/Tél: 250.363.3101 | dustin.jenk...@nrc-cnrc.gc.ca

facsimile/télécopieur: (250) 363-0045

National Research Council Canada | 5071 West Saanich Rd, Victoria BC. 
V9E 2E7

Conseil national de recherches Canada | 5071, ch. West Saanich, Victoria 
(C.-B) V9E 2E7

Government of Canada | Gouvernement du Canada

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


Re: CAS authentication in Restlet server

2009-12-01 Thread Arjohn Kampman
Hi Jerome, others,

I have just started working on this. If I get it up-and-running, I can
probably donate the code to the restlet project if you like.

I'm currently looking at the org.restlet.security API, but I'm seeing a
lot of terms/concepts that are new to me. Do you have a bit of
documentation that explains the basic concepts of this API? That would
be very helpful.

Regards,

Arjohn Kampman

Jerome Louvel wrote:
 Hi all,
 
 In addition, we have a pending RFE:
 
 Support SSO mechanisms
 http://restlet.tigris.org/issues/show_bug.cgi?id=693
 
 There is an indirect pointer there to another CAS implementation from Alex
 Horn.
 
 I might be a good idea to provide a dedicated Restlet extension for CAS.
 Anyone willing to lead this?

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