Re: CryptoUtil
Hello Juan Carlos ! Have you the crypto extension in your classpath ? Rémi On Wed, Mar 3, 2010 at 17:47, Juan Carlos Gonzalez juancarlos.gonza...@pentasoft.es wrote: Hi I've been reviewing some examples using Restlet and I'm interested in a CookieAuthenticator. I see that it was using org.restlet.engine.util.CryptoUtils package, but I can't find it on M7. Is this package supported in Restlet M7?. KR Juan Carlos González -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2454518 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2455148
Re: MIME Accept Type filter
Hello, One simple hack I use is to check for ajax requests using to the X-Requested-With header. That way I don't add for example the json representation. Hope it helps, Rémi On Wed, Dec 16, 2009 at 05:21, Andrzej Berico andy.glo...@bericotechnologies.com wrote: Our Restlet resource server APPLICATION_JSON and APPLICATION_XML. A JQuery client, sets the Accept Type to */*, application/xml. So the Restlet negotiates that APPLICATION_JSON should be returned as expected. However, we want APPLICATION_XML to be served. The problem is that we are unable to remove the */* as the first Accept type in JQuery. JQuery seems to tack on the */* as an Accept Type to every request we send. Is there an elegant way in Restlet to filter the */* values, e.g. ALL or APPLICATION_ALL? We can certainly get the Accept Headers in Restlet and re-arrange the Accept list ourselves to override the Restlet negotiation. We are thinking of filtering, after Restlet negotiation, based on the User-Agent header for this particular JQuery client, so as not to break the Restlet behaviour for other clients (which is what we expect.) -- View this message in context: http://n2.nabble.com/MIME-Accept-Type-filter-tp4173789p4173789.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2430710 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2430731
Re: DomRepresentation setIndent bug
Thierry, Unfortunately this is buggy : java.lang.IllegalArgumentException: Serialization parameter {indent} must have the value yes or no Boolean.toString(isIndent()) should be replaced by: isIndent() ? yes : no Cheers, Rémi On Thu, Nov 12, 2009 at 09:34, Thierry Boileau thierry.boil...@noelios.comwrote: Hi, thanks for your report, the fix is available in the svn repository. Best regards, Thierry Boileau Hi, There seems to be a bug in DocRepresentation#createTransformer. Why this: transformer.setOutputProperty( javax.xml.transform.OutputKeys.INDENT, Boolean .toString(isIndent())); is inside the if (docType != null). The setIndent is not working because of this. Thanks -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2416920 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2416978
Re: Trouble with ServerServlet
Rickard, I have the feeling that overriding ServerServlet is not the way to go. AFAIR you should be able to use it out ofthebox configuring the application in web.xml. I don't know if stop() is called either but I think so. Rémi On Thu, Oct 22, 2009 at 08:56, Rickard Öberg rickardob...@gmail.com wrote: On 2009-10-21 18.24, Rickard Öberg wrote: I can see that ServerServlet.destroy() *is* called when webapp is redeployed, but it doesn't call stop() on my application. When looking in the ServerServlet code it's a bit weird, because the init() code calls getApplication().start(), but destroy() calls getComponent().stop()! I'm guessing my problem is somewhere with that. Why aren't these methods starting/stopping the same thing? I've temporarily fixed this by overriding destroy() as well, and do application.stop() on my own. This works, but I'd prefer if the base ServerServlet does it for me. /Rickard -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2410088 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2410096
Re: Re: Redirect Restlet console statements to an external log file using log4j.properties
Hi, In addition to what Timothy explains. I usually remove the default java logger as well : java.util.logging.Logger rootLogger = LogManager.getLogManager().getLogger(); Handler[] handlers = rootLogger.getHandlers(); rootLogger.removeHandler(handlers[0]); SLF4JBridgeHandler.install(); Rémi On Tue, Oct 20, 2009 at 04:57, Timothy Aanerud taane...@aticonsulting.comwrote: Try again... It only takes one additional import, one line of code and three additional jar files to get Restlet outputs merged into log4j. After you initialize Log4j, add this line of code: SLF4JBridgeHandler.install() These are the three additional jars: - jul-to-slf4j-1.5.8.jar -- Converts JUL to slf4j format - slf4j-api-1.5.8.jar -- base classes for SLF4J - slf4j-log4j12-1.5.8.jar -- converts SLF4J to log4j The JUL output will still be be there on standard out and standard err, but everything will be merged into your log4j logs. -- Timothy On Mon, Oct 19, 2009 at 12:01 AM, Ty ty.new...@copperchipgames.comwrote: Hi, I had a look at the user guide for v1 and v2 and am still a bit confused about getting the Restlet logs to be processed by my application i.e. end up in my log files. My application uses log4j. I followed the lin kto the slf4j website and couldn't find anything on a JUL to log4j brudge. It looks like they have a JUL to slf4j bridge though. Is my newb'ness the problem? Could someone spell it out slowly for me :) Thanks, Ty -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2408822 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2409258
Re: Netty extension
Hello Gabriel, Thanks a lot for sharing. I think I am going to give a try. What was the main benefits you were expecting developing this extension ? Rémi On Mon, Sep 21, 2009 at 17:34, Gabriel Ciuloaica gciuloa...@gmail.comwrote: Hi, I just finalized the extension. It provides both HTTP and HTTPS server support. Current source code is stored on Github. If you are interested to use it, here is git clone url: git://github.com/bitover/RestletExtensionNetty.git Br, Gabi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2397506 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2397684
Re: Integrating Apache and Restlet server like Apache and Tomcat
Hello, Not sure I understood the question. You'd better user mod_proxy and ProxyPass instead of mod_jk. Rémi On Tue, Sep 22, 2009 at 14:40, Ashish Sharma ashish.shar...@hp.com wrote: Hello, I have my Apache http server running on localhost:80 and restlet server on localhost:8182, but I want to configure above combination just like Apache http server and Apache tomcat servlet container can be configured with mod_jk library. Is it possible? Do I have to modify code of mod_jk for this purpose. Please advice!!! Thanks in advance!! Ashish -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2397811 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2398608
Re: Re: HTML Email
Hello, Using this, you no longer use body but multipart tags, the patch is pretty understandable. It would be nice you take it and submit a proper patch for the current SVN trunk ! Hope it helps, Rémi On Fri, Jul 10, 2009 at 22:32, webp...@tigris.org wrote: I'd love to get that multi-part patch. Can you post the code? thanks -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2370212 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2371413--- com.noelios.restlet.ext.javamail_1.4 original/com/noelios/restlet/ext/javamail/RepresentationMessage.java 2008-10-28 17:36:28.0 +0100 +++ com.noelios.restlet.ext.javamail_1.4/com/noelios/restlet/ext/javamail/RepresentationMessage.java 2008-09-15 10:25:07.0 +0200 @@ -1,5 +1,6 @@ /** * Copyright 2005-2008 Noelios Technologies. + * Copyright 2008 GIDE. * * The contents of this file are subject to the terms of the following open * source licenses: LGPL 3.0 or LGPL 2.1 or CDDL 1.0 (the Licenses). You can @@ -35,19 +36,22 @@ import javax.mail.Session; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeBodyPart; import javax.mail.internet.MimeMessage; +import javax.mail.internet.MimeMultipart; import org.restlet.resource.DomRepresentation; import org.restlet.resource.Representation; import org.w3c.dom.Document; import org.w3c.dom.Element; +import org.w3c.dom.Node; import org.w3c.dom.NodeList; /** * JavaMail MIME message based on an XML representation. For the XML format, see * the {...@link JavaMailClientHelper} class. * - * @author Jerome Louvel + * @author Jerome Louvel, Charles-henri Guérin */ public class RepresentationMessage extends MimeMessage { @@ -94,11 +98,35 @@ bcc[i] = bccList.item(i).getTextContent(); } -final String text = root.getElementsByTagName(body).item(0) -.getTextContent(); + +final Element multipart=(Element)root.getElementsByTagName(multipart).item(0); +final NodeList partList; +final MimeBodyPart[] part; + +if(multipart!=null) { + partList=multipart.getElementsByTagName(part); + part=new MimeBodyPart[partList.getLength()]; + + + for(int i=0;ipart.length;i++) { + part[i]=new MimeBodyPart(); + Node n1=partList.item(i); + String n2=n1.getAttributes().getNamedItem(type).getTextContent(); + + if(file.equals(n2)) + part[i].attachFile(n1.getAttributes().getNamedItem(src).getTextContent()); + else if(text.equals(n2) || html.equals(n2)) { + String charset=n1.getAttributes().getNamedItem(charset).getTextContent(); + part[i].setText((String)n1.getTextContent(),charset,n2); + } + } +} else + part=null; + + final Element text=(Element)root.getElementsByTagName(body).item(0); // Set the FROM and TO fields -setFrom(new InternetAddress(from)); +setHeader(From,from); for (final String element : to) { addRecipient(Message.RecipientType.TO, new InternetAddress(element)); @@ -115,7 +143,23 @@ // Set the subject and content text setSubject(subject); -setText(text); + +final MimeMultipart mp; +if(multipart!=null) { + mp=new MimeMultipart(); + + for(MimeBodyPart mbp:part) + mp.addBodyPart(mbp); + + setContent(mp); + saveChanges(); +} else { + String type=text.getAttribute(type), + charset=text.getAttribute(charset); + + setText(text.getTextContent(),charset,type); +} + setSentDate(new Date()); saveChanges(); }
Re: HTML Email
Hello, One of my colleague has done a patch to the actual Javamail extension to be able to send multipart and thus html message. I should be able to provide the patch if you want... Cheers, Rémi On Wed, Jul 8, 2009 at 23:31, webp...@tigris.org wrote: Hi Jerome... I've actually traced this down to a bug in the JavaMail extension. com.noelios.restlet.ext.javamail.RepresentationMessage constructs a MimeMessage out of the XML doc. When doing so, it calls setText(text) in order to set the body. If you look at MimeMessage.setText(String text);, it states: Convenience method that sets the given String as this part's content, with a MIME type of text/plain. So...as a result, email is always going out as plaintext. I've patched my local version of 1.1.5 to use setContent, and pull the mime type from the representation: setContent(text, xmlMessage.getMediaType().toString()); Seems to work. thanks -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2369147 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2369270
FileClientHelper
Hello, With last trunk code, I would like the FILE client helper NOT to find test.xml.001.bak when I ask for test.xml, how can I achieve this ? Thanks, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2369426
Re: FileClientHelper
Hello, Actually found a solution/hack, at application startup : getMetadataService().addExtension(bak, MediaType.valueOf(application/backup)); I am not sure it is the normal behavior... Rémi 2009/7/9 Rémi Dewitte r...@gide.net Hello, With last trunk code, I would like the FILE client helper NOT to find test.xml.001.bak when I ask for test.xml, how can I achieve this ? Thanks, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2369429
Re: Cookie behavior - IE7 vs Firefox
Hey John ! I don't know which code exactly you are using. Try to disable the setVersion() on the CookieSetting. I am really looking forward having the Cookie authentication mechanism included in Restlet because I think it is a important requirement in many web applications. First benefit in the ability to logout. Cheers, Rémi On Tue, May 5, 2009 at 17:26, John Wismar john.wis...@autozone.com wrote: Hey, all- I'm using Restlet 1.1.4 in my project. I'm working on using cookies to create a concept of login sessions. (Yes, I know about the philosophical problems - business requirements dictate this.) I've been looking at Remi Dewitte's CookieGuard implementation discussed on this list last December, and using that for a framework/guideline on how to work with cookies in Restlet. The code I have in place now seems to work fine in Firefox. It does not seem to be working in IE7. When I log all of the HTTP traffic, it seems that my service is sending the Set-Cookie headers in the places that I expect to see them, but that IE does not send the cookies back upon any request. I've tried different variations on how the cookies get created (e.g. with or without Access Restricted flag, using different path and timeout and version settings), but nothing has seemed to make a difference. I have also looked at the IE security and privacy settings, but I don't see anything that looks relevant. I have too many variables and unknowns to know where the problem lies. Has anyone seen this behavior? Is there a different way of configuring the cookies? Is this a coding problem on my side, or an IE7 configuration issue? Thanks for any insight! John Wismar mailto:john.wis...@autozone.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2070293 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2070403
Re: Restlet 1.2 to become Restlet 2.0
Hello Jérôme, A kind of useless reply. I totally agree with this decision ! Regards, Rémi On Wed, May 6, 2009 at 10:57, Jerome Louvel jerome.lou...@noelios.comwrote: Hi all, Looking at the amount of new features that we added so far since Restlet 1.1 (with some more coming), the amount of refactoring and reorganization done in the Restlet API (touching the core Resource API) and extension packages and the growing number of special Restlet editions (Java SE/Java EE, GWT, Google App Engine and soon Android), it seems appropriate to rename the Restlet 1.2 release into Restlet 2.0. The idea is to give existing users an accurate feeling of the amount of effort required when upgrading from Restlet 1.0 or Restlet 1.1 and for new users to realize the amount of effort and changes done since Restlet 1.x. I hope it will make sense to you guys. We have updated our issue tracker and our roadmap here: http://www.restlet.org/aboMainut/roadmaphttp://www.restlet.org/about/roadmap Next release will be Restlet 2.0 M3 and will replace the current Restlet 1.2 M2 (tagged “testing”). Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2078682
Re: Questions about HTTP Authentication
Try: l.debug(getSecret():+ new String(getRequest().getChallengeResponse().getSecret())); Rémi On Wed, Apr 29, 2009 at 14:25, mstricker m...@maxstricker.it wrote: Hello, yes I tried to use getSecret() but with no success. Here the results of my testing: the code that tries to read the secret: if (getRequest().getChallengeResponse() != null) { l.debug(getCredentials():+getRequest().getChallengeResponse().getCredentials()); l.debug(getIdentifier():+getRequest().getChallengeResponse().getIdentifier()); l.debug(getPrincipal():+getRequest().getChallengeResponse().getPrincipal()); l.debug(getScheme():+getRequest().getChallengeResponse().getScheme()); l.debug(getSecret():+getRequest().getChallengeResponse().getSecret().toString()); } the output: 14:20:19,218 DEBUG TestResource:66 - getCredentials():dXNlcjp0ZXN0 14:20:19,218 DEBUG TestResource:67 - getIdentifier():user 14:20:19,218 DEBUG TestResource:68 - getPrincipal():user 14:20:19,218 DEBUG TestResource:69 - getScheme():HTTP_Basic 14:20:19,218 DEBUG TestResource:70 - getSecret():[...@d5a2a9 The input was username user and password test. To test it I used the RESTClient (available at http://code.google.com/p/rest-client/) with the following settings for authentication: Auth Type : Basic. Preemtive, Username user Password test any ideas? Best Regards, mstricker Am 28.04.2009 um 11:36 schrieb Thierry Boileau (via Nabble): Hello, did you try with simple calls to ChallengeResponse#getIdentifier and ChallengeResponse#getSecret()? I check these methods and they return the login and password in clear. Best regards, Thierry Boileau Hi, i found that my Client sends the Basic HTTP Authentication as Base64 encoded String containing username + : + pass I decode it in this way: public static boolean authenticate(ChallengeResponse challenge) { if (challenge != null) { String username = ; String password = ; BASE64Decoder decoder = new BASE64Decoder(); try { logger.debug(Credentials: +challenge.getCredentials()); String usernpass = new String(decoder.decodeBuffer(challenge.getCredentials().toString())); username = usernpass.substring(0, usernpass.indexOf(:)); password = usernpass.substring(usernpass.indexOf(:) + 1); boolean auth = User.authenticate(username, password); logger.debug(auth); return auth; } catch (IOException ex) { return false; } } else { return false; } } Am 27.04.2009 um 17:54 schrieb João Pereira (via Nabble): Hi, I'm also facing the same problem. The credentials and secret are not in clear text. I've created a guard and override the public boolean checkSecret(Request request, String identifier, char[] secret) However the secret and request.getChallengeResponse().getCredentials() are not in plain text. What the algorithm to decode to the original? -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1947397 http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1947397 View this message in context: Re: Questions about HTTP Authentication http://n2.nabble.com/Questions-about-HTTP-Authentication-tp2665559p2728071.html Sent from the Restlet Discuss mailing list archive http://n2.nabble.com/Restlet-Discuss-f1400322.html at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1961264 -- View this message in context: Re: Questions about HTTP Authenticationhttp://n2.nabble.com/Questions-about-HTTP-Authentication-tp2665559p2740252.html Sent from the Restlet Discuss mailing list archivehttp://n2.nabble.com/Restlet-Discuss-f1400322.htmlat Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1979623
Saxon extension
Hello all, I have submitted recently an extension for Saxon to have XQuery representation. * XQuery scripts can be compiled and cached at application startup. * They can be compiled as a test also to be sure that nothing is broken. Using XQuery you are sure that no end tag or mispelling is to break you page in a browser if you generate XHTML for example. * Modularity is available thanks to modules. * Performance is really nice. * It can easily be pipelined as a source for an TransformerRepresentation * It is easier to write a XQuery script than a XSL template for some people and some situations. The code is here : http://restlet.tigris.org/issues/show_bug.cgi?id=8 I do a bit of advertising because I think it would be useful (at least for me) to have it part of Restlet 1.2. Anyone interested ? Regards, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1951680
Re: Re: Google AppEngine and Restlet
Jérôme, As far as I understand, we can't reuse Restlet extensions made for org.restlet.* with org.restlet.gae.* classes, can we ? I have thought at a time that GAE would be a deployment option for our restlet applications. With the gae copy, we may not reuse an application as straitforward as I may have dreamed. I see Restlet extensible enough not to have to copy the full code base. Would that dream have been possible with 1.1 with the API and Engine separation ? Why should not we support this scenario ;) ? Thanks, Rémi On Wed, Apr 15, 2009 at 22:29, Jerome Louvel jerome.lou...@noelios.comwrote: Hi Richy, Thanks for sharing your experience! When I did the adaptation of Restlet to GAE (resulting in the new org.restlet.gae.jar available in recent snapshots), I took the source code and had to remove many classes that didn't compile due to the lack of sockets and SSL support (mainly the internal connectors). I'm surprised that the org.restlet.jar works despite this and I'm not sure if we should support this usage scenario. In addition, org.restlet.gae.jar includes the ServerServlet, the JavaMail and the JDK's Net connectors. In the future, it will leverage other GAE APIs. Regarding FreeMarker, the ContextTemplateLoader I just added to SVN trunk will probably help simplifying its usage in GAE with Restlet. Let me know if you have a chance to test it. 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 : webp...@tigris.org [mailto:webp...@tigris.org] Envoyé : samedi 11 avril 2009 14:49 À : discuss@restlet.tigris.org Objet : RE: Re: Google AppEngine and Restlet After a bit of experimentation I have managed to get a Restlet/Freemarker stack running on GAE. The basic steps I took were : 1. Modify ServletConverter and ServletContextAdapter as detailed below. Basically this means replacing the calls to new ServletLogger with Logger.getLogger e.g. in the ServletConverter constructor do something like... super(new Context(Logger.getLogger(ServletConverter.class.getName(; 2. Add org.freemarker.jar, org.restlet.jar, org.restlet.ext.servlet.jar and org.restlet.ext.freemarker.jar to the WEB-INF/lib of your google app project and add to the build path. 3. Follow usual setup for getting Restlet working in a Servlet environment. Folow the HelloWorld tutorial in the getting started docs - it should work fine locally (even without doing step 1. However, you'll need to replace these calls in order to get it to run in the real GAE) 4. Freemarker was a little more tricky, but not much. Create a freemarker configuration that uses the class template loader and put this in the Restlet Application context attributes. 5. Make sure your templates are somewhere on the class path. 6. Use the TemplateRepresentation along with your freemarker config from the context attributes 7. Make sure it works locally and upload to the app engine. Hopefully I'll get a chance to write this up properly over easter, but it wasn't too bad and looks promising so far. Cheers, Richy http://wiredupandfiredup.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=16485 97 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1732294 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1732825
Re: Restlet and maven
Hello Thierry, I am thinking of META-INF/services/* for client helpers for example. Have you encountered any issue with my patch ? I have included all files in src/ except .java and package.html but we could be more specific. Just have to change the include content. Cheers, Rémi On Thu, Apr 16, 2009 at 09:39, Thierry Boileau thierry.boil...@noelios.comwrote: Hello Rémi, what kind of files are thinking about? package.html, overview.html files? Best regards, Thierry Boileau Hello, There is an issue with the maven build. Resources files (not java files) in src/ are not in the final jar. Rémi 2009/4/8 Rémi Dewitte r...@gide.net mailto:r...@gide.net Hi ! Thanks all for your answers. I was not really worried about building the project with ant or maven. I use maven to build most of my projects and I want to test them with last updates. As maven.restlet.org http://maven.restlet.org is not being updated everyday ;). Cheers, Rémi On Tue, Apr 7, 2009 at 17:02, Davide Angelocola davide.angeloc...@gmail.com mailto:davide.angeloc...@gmail.com wrote: Hi Rémi,   assuming you've installed maven in the PATH you must run the following command in trunk/modules: mvn install using netbeans is even easier, just install the maven plugin and open the modules project. Then build the project. Best Regards, Davide Angelocola 2009/4/7 Rémi Dewitte r...@gide.net mailto:r...@gide.net Hello, I know there is some ongoing work about maven and restlet. If I checkout the trunk and build it, how do I install the new artifacts into my local m2 repository ? Thanks, Rémi -- -- Davide Angelocola -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1742259 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1742499
Re: Restlet and maven
Jérôme, I had to disable test and example module to have mvn install work. Apparently it does work as I expect :). Rémi On Thu, Apr 16, 2009 at 11:28, Jerome Louvel jerome.lou...@noelios.comwrote: Thanks Remi, fix applied to SVN trunk! Cheers, Jerome -- *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de * Rémi Dewitte *Envoyé :* jeudi 16 avril 2009 09:17 *À :* discuss@restlet.tigris.org *Objet :* Re: Restlet and maven Here is a fix ! Rémi 2009/4/15 Rémi Dewitte remidewi...@gmail.com I will try something as soon as possible ! Rémi On Wed, Apr 15, 2009 at 23:19, Jerome Louvel jerome.lou...@noelios.comwrote: Hi Rémi, In our code organization, resources are part of the Java source directory (contrary to Maven's default layout). Could you suggest a fix? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de* Rémi Dewitte *Envoyé :* jeudi 9 avril 2009 17:18 *À :* discuss@restlet.tigris.org *Objet :* Re: Restlet and maven Hello, There is an issue with the maven build. Resources files (not java files) in src/ are not in the final jar. Rémi 2009/4/8 Rémi Dewitte r...@gide.net Hi ! Thanks all for your answers. I was not really worried about building the project with ant or maven. I use maven to build most of my projects and I want to test them with last updates. As maven.restlet.org is not being updated everyday ;). Cheers, Rémi On Tue, Apr 7, 2009 at 17:02, Davide Angelocola davide.angeloc...@gmail.com wrote: Hi Rémi, assuming you've installed maven in the PATH you must run the following command in trunk/modules: mvn install using netbeans is even easier, just install the maven plugin and open the modules project. Then build the project. Best Regards, Davide Angelocola 2009/4/7 Rémi Dewitte r...@gide.net Hello, I know there is some ongoing work about maven and restlet. If I checkout the trunk and build it, how do I install the new artifacts into my local m2 repository ? Thanks, Rémi -- -- Davide Angelocola -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1744247
Re: Restlet and maven
I will try something as soon as possible ! Rémi On Wed, Apr 15, 2009 at 23:19, Jerome Louvel jerome.lou...@noelios.comwrote: Hi Rémi, In our code organization, resources are part of the Java source directory (contrary to Maven's default layout). Could you suggest a fix? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de * Rémi Dewitte *Envoyé :* jeudi 9 avril 2009 17:18 *À :* discuss@restlet.tigris.org *Objet :* Re: Restlet and maven Hello, There is an issue with the maven build. Resources files (not java files) in src/ are not in the final jar. Rémi 2009/4/8 Rémi Dewitte r...@gide.net Hi ! Thanks all for your answers. I was not really worried about building the project with ant or maven. I use maven to build most of my projects and I want to test them with last updates. As maven.restlet.org is not being updated everyday ;). Cheers, Rémi On Tue, Apr 7, 2009 at 17:02, Davide Angelocola davide.angeloc...@gmail.com wrote: Hi Rémi, assuming you've installed maven in the PATH you must run the following command in trunk/modules: mvn install using netbeans is even easier, just install the maven plugin and open the modules project. Then build the project. Best Regards, Davide Angelocola 2009/4/7 Rémi Dewitte r...@gide.net Hello, I know there is some ongoing work about maven and restlet. If I checkout the trunk and build it, how do I install the new artifacts into my local m2 repository ? Thanks, Rémi -- -- Davide Angelocola -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1733352
Re: Restlet and maven
Hello, There is an issue with the maven build. Resources files (not java files) in src/ are not in the final jar. Rémi 2009/4/8 Rémi Dewitte r...@gide.net Hi ! Thanks all for your answers. I was not really worried about building the project with ant or maven. I use maven to build most of my projects and I want to test them with last updates. As maven.restlet.org is not being updated everyday ;). Cheers, Rémi On Tue, Apr 7, 2009 at 17:02, Davide Angelocola davide.angeloc...@gmail.com wrote: Hi Rémi, assuming you've installed maven in the PATH you must run the following command in trunk/modules: mvn install using netbeans is even easier, just install the maven plugin and open the modules project. Then build the project. Best Regards, Davide Angelocola 2009/4/7 Rémi Dewitte r...@gide.net Hello, I know there is some ongoing work about maven and restlet. If I checkout the trunk and build it, how do I install the new artifacts into my local m2 repository ? Thanks, Rémi -- -- Davide Angelocola -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1620322
Re: Annotations and Restlet's future
Hello, I thank you all to clear my mind about annotations. Annotations are probably good to get started with a hello world or minimize the amount of code you would write. But you lose some compilation checks and moreover developing further more complex resources will require to understand how it works (routing/switch logic) and which methods will not be called because of the use of annotations. If I want to search for resources class will I have to search for @Resource as well ? How far are we from annotated Restlets ? Would it be possible to have ServerResource free of annotation logic and an AnnotatedServerResource subclass removing the need for isAnnotated ? Cheers, Rémi On Thu, Apr 9, 2009 at 17:47, Rob Heittman rob.heitt...@solertium.comwrote: GWT 1.5/1.6 is happy with annotations at compile time ... but if the implementation needs to examine them at runtime via reflection, GWT doesn't have that capability. GWT getClass() emulation doesn't have getAnnotations() ... or much of anything else. There's no reflection in the Javascript room. Restlet 1.2's current incarnation is fine with me ... annotations optional. But I agree that the non-annotation and annotation approach should use the same vowels and consonants in the same order whenever possible :-) This helps us bears of very little brain. On Thu, Apr 9, 2009 at 7:06 AM, Tim Peierls t...@peierls.net wrote: On Thu, Apr 9, 2009 at 4:57 AM, Rob Heittman rob.heitt...@solertium.comwrote: ...my only *strong* requirement, that the annotation based solution must remain a voluntary choice and not the only way to get things done. It should remain possible to achieve whatever annotations can achieve in a non-annotation way. This allows the basic API outline to work in places where annotations are not available or work differently enough to cause friction (pre-1.5 JVM backports, GWT, API ports to other languages, Scala ...) It is OK with me if the non-annotation approach requires verbosity or heavy lifting, it just needs to exist. Isn't that currently the case with the 1.2 branch? (Does GWT not support annotations yet? I thought it did.) It would be best if the non-annotation approach used the same terminology as the annotations, and I think that's not the case right now. --tim -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1625766
Re: Restlet 1.2 M2 released [throw previous email away]
Why not making it optional ? As for me, I quite like extension names and would keep it enabled because it makes uri comprehensives. Examples http://server/path/resource?media=xml http://server/path/resource?media=json http://server/path/resource?media=xls Easy to guess or try the others for an end user. Cheers, Rémi On Wed, Apr 8, 2009 at 19:52, Tal Liron tal.li...@threecrickets.com wrote: Then perhaps TunnelService shouldn't be using extension names, either. ;) Sure, let's get more feedback. I just want to point out that this is a matter of taste and clarity rather than any technical issue. As for my taste, tou haven't managed to change it, yet. I think things are very clear to you because you've been swimming in Restlet for years, but for new users, who will try to wrap their mind around how to write a Resource and even what exactly a Resource is, will be confused by the introduction of *what appear to be* filename extensions. The reason is that actual, real filename extensions are always part of the mix, whether as files existing on the filesystem or in the resource's URI. (Even worse, Restlet uses the word extension to refer to its plugin system -- there's one more layer of potential confusion here.) The more I think about it, the more I think that shortcuts should be optional, and that the full, complete MIME type should be used, * especially* in the tutorials. Clarity should come above everything. If the technical issue is that the / character is used by the grammar, then perhaps we need a better grammar that treats / as part of the lexical item. This is an important issue. I really hope other Restlet users will chime in to express their opinion on this matter. Like Jerome, I'm very willing to be convinced that my position creates more problems than it solves! -Tal Jerome Louvel wrote: Tal, The MetadataService isn't restricted at all to mapping filename extensions. As I pointed out previously, it is already used by the TunnelService to customize client preferences, which has nothing to do with files. From where do you get this impression? Maybe we could clarify some documentation? Regarding the @Get(jpg | jpeg | jpe): first it should allowed, maybe generating a log/warning about the redundancy. Then proper examples and documentation will help clarifying this edge case. I really don't see any design issue here. Quite on the opposite, I even see advantages of using a single consistent registry. Probably we should give this more time to mature, and wait for further feed-back. As always, if proven wrong, I'm always happy to change my mind. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* Tal Liron [mailto:tal.li...@threecrickets.comtal.li...@threecrickets.com] *Envoyé :* mardi 7 avril 2009 20:35 *À :* discuss@restlet.tigris.org *Objet :* Re: Restlet 1.2 M2 released [throw previous email away] I like the idea of having a default Extension for each MediaType, which means that they are all mappable. I understand the multiple uses of the word Extension, but my problem is the multiple uses of Extension itself in Restlet. :) The MetadataService really is used for mapping filename extensions, not only for parsing MediaTypes. I just feel uncomfortable about this mix of uses. Specifically, consider that the filename extensions use requires that have a many-to-one mapping of MediaTypes. For an example of how this can confuse users, a user might think that they need to do this in order to fully support all requests for JPEG format: @Get(jpg | jpeg | jpe) Those three extensions are indeed registered right now in MetadataService. However, they all point to MediaType.IMAGE_JPEG, and this is superfluous. So, somewhere in the documentation it must be emphasized to the user that we are not referring to filename extensions here, but rather the MIME types, and that only one Extension would be enough. I feel that this kind of awkward explanation can be easily avoided with a one-to-one mapping of shortcuts, and a separate registry to handle filename extension one-to-many mapping. Separate uses, separate mechanisms. -Tal Jerome Louvel wrote: Tal, It's really a matter of terminology, so it's hard to rationalize the choice. I know that extension is often synonymous of file extension but it doesn't have to. If you look at WordNet definition of the extension word, you should feel more comfortable about using it as an equivalent to shortcut: http://wordnetweb.princeton.edu/perl/webwn?s=extension The advantage of this terminology is that it maps directly to the file extension concept which is widely known, but is more generic: you need to update your mental mapping for this word, not always easy ;). We already use it in the TunnelService to customize the Accept header
Re: Annotations and Restlet's future
I can see that Jérôme has already answered a great deal of my questions in this thread :) http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1596334 Rémi 2009/4/8 Rémi Dewitte r...@gide.net Hello, I struggle to get convinced to the use of annotations for resources from all I can read from various threads. I have the feeling to lose most of the reasons to use Java. MediaTypes are strings, I find the implementation a bit tricky with reflection forced to be cached to be fast, classloaders issues. I guess there is a rule to handle annotations with class hierarchies, etc. I totally understand that some people like annotations and the work it has triggered was a good way to get the resource API even better. What are the benefits of using annotations with Restlet ? Restlet annotations are a competitor of JAXRS, right ? To what extend is it better ? Will annotations in restlet the advertised way of creating restlet application ? What are the other planned uses of annotations ? Regards, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1596551
Annotations and Restlet's future
Hello, I struggle to get convinced to the use of annotations for resources from all I can read from various threads. I have the feeling to lose most of the reasons to use Java. MediaTypes are strings, I find the implementation a bit tricky with reflection forced to be cached to be fast, classloaders issues. I guess there is a rule to handle annotations with class hierarchies, etc. I totally understand that some people like annotations and the work it has triggered was a good way to get the resource API even better. What are the benefits of using annotations with Restlet ? Restlet annotations are a competitor of JAXRS, right ? To what extend is it better ? Will annotations in restlet the advertised way of creating restlet application ? What are the other planned uses of annotations ? Regards, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1596005
Re: Restlet and maven
Hi ! Thanks all for your answers. I was not really worried about building the project with ant or maven. I use maven to build most of my projects and I want to test them with last updates. As maven.restlet.org is not being updated everyday ;). Cheers, Rémi On Tue, Apr 7, 2009 at 17:02, Davide Angelocola davide.angeloc...@gmail.com wrote: Hi Rémi, assuming you've installed maven in the PATH you must run the following command in trunk/modules: mvn install using netbeans is even easier, just install the maven plugin and open the modules project. Then build the project. Best Regards, Davide Angelocola 2009/4/7 Rémi Dewitte r...@gide.net Hello, I know there is some ongoing work about maven and restlet. If I checkout the trunk and build it, how do I install the new artifacts into my local m2 repository ? Thanks, Rémi -- -- Davide Angelocola -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1595694
Restlet and maven
Hello, I know there is some ongoing work about maven and restlet. If I checkout the trunk and build it, how do I install the new artifacts into my local m2 repository ? Thanks, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1577851
Re: Restlet and maven
Cool ! Exactly what I wanted :). Rémi On Tue, Apr 7, 2009 at 17:15, Jerome Louvel jerome.lou...@noelios.comwrote: Rémi, Otherwise, for working with Maven, you want to check this page: Building with Maven http://wiki.restlet.org/developers/179-restlet/240-restlet.html 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 : Alexander J. Perez Tchernov [mailto:xas...@gmail.com] Envoyé : mardi 7 avril 2009 17:06 À : discuss@restlet.tigris.org Objet : Re: Restlet and maven Have you already checked http://www.restlet.org/downloads/maven ? Or you want to build /install from the trunk sources from scratch. 2009/4/7 Rémi Dewitte r...@gide.net: Hello, I know there is some ongoing work about maven and restlet. If I checkout the trunk and build it, how do I install the new artifacts into my local m2 repository ? Thanks, Rémi -- Best regards, ~ Xasima Xirohata ~ -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=15783 31 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1578458 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1581586
Re: Accept: application/json
Hi ! You may have a look here : http://wiki.restlet.org/docs_1.2/13-restlet/27-restlet/130-restlet.html Cheers, Rémi On Wed, Mar 18, 2009 at 07:25, Donald S Strong donald.str...@transport.vic.gov.au wrote: Hi all, I want to set the Accept request header but I am frustrated in my attempts. When I try to set the headers in the request the HttpConverter informs me: Addition of the standard header Accept is not allowed. Please use the Restlet API instead. ... but I cannot find where in the Restlet API that I can set the Accept header. Could someone please point me to the appropriate place in the documentation. Regards Donald. ** Any personal or sensitive information contained in this email and attachments must be handled in accordance with the Victorian Information Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988 (Commonwealth), as applicable. This email, including all attachments, is confidential. If you are not the intended recipient, you must not disclose, distribute, copy or use the information contained in this email or attachments. Any confidentiality or privilege is not waived or lost because this email has been sent to you in error. If you have received it in error, please let us know by reply email, delete it from your system and destroy any copies. ** -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1345839 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1346125
Re: Accept: application/json
Hi ! You may have a look here : http://wiki.restlet.org/docs_1.2/13-restlet/27-restlet/130-restlet.html Cheers, Rémi On Wed, Mar 18, 2009 at 07:25, Donald S Strong donald.str...@transport.vic.gov.au wrote: Hi all, I want to set the Accept request header but I am frustrated in my attempts. When I try to set the headers in the request the HttpConverter informs me: Addition of the standard header Accept is not allowed. Please use the Restlet API instead. ... but I cannot find where in the Restlet API that I can set the Accept header. Could someone please point me to the appropriate place in the documentation. Regards Donald. ** Any personal or sensitive information contained in this email and attachments must be handled in accordance with the Victorian Information Privacy Act 2000, the Health Records Act 2001 or the Privacy Act 1988 (Commonwealth), as applicable. This email, including all attachments, is confidential. If you are not the intended recipient, you must not disclose, distribute, copy or use the information contained in this email or attachments. Any confidentiality or privilege is not waived or lost because this email has been sent to you in error. If you have received it in error, please let us know by reply email, delete it from your system and destroy any copies. ** -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1345839 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1346127
Grizzly on maven repo
Hello, Is there any reason why the grizzly extension is not deployed as a maven artifact ? I found that just adding a line in build.xml does the trick ! Regards, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1271105 maven-grizzly.svndiff Description: Binary data
Re: Media types
Jérôme, Patch attached. Rémi On Sat, Feb 7, 2009 at 14:11, Jerome Louvel jerome.lou...@noelios.comwrote: Hi Rémi, It seems that those media types are widespread enough to be added in the Restlet API. Would you have time to provide a patch? If not, could you create a RFE? Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de * Rémi Dewitte *Envoyé :* jeudi 5 février 2009 10:32 *À :* discuss@restlet.tigris.org *Objet :* Re: Media types Pointers: http://technet.microsoft.com/ja-jp/library/cc179224.aspx http://framework.openoffice.org/documentation/mimetypes/mimetypes.html Rémi On Thu, Feb 5, 2009 at 10:16, Rémi Dewitte r...@gide.net wrote: Hello, New mediatypes are static fields of my application class. And I declare new extension in my application constructor. What is the best place to call MediaType#register and MetadaService#addExtension ? At what stage do you think we should include OOo and OOXML mime types in the Restlet standard distribution ? I ask it because MediaType already includes declaration for standard microsoft types. Cheers, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1226231 mimetypes.svndiff Description: Binary data
Re: DOM formatting
Jérôme, I have the feeling that defaulting it to true is not really the right thing to do. I think you don't need very often to have the XML output in a fashionable way and it will by default consume more resources for nothing. Because most of the time xml is not meant to be consumed by humans (except debugging). Moreover, IE or FF are both able to display XML trees. If you use curl to test your XML Restlet, just do somthing like this : curl url | xmllint --format - And you are done. Rémi On Fri, Feb 6, 2009 at 12:54, Jerome Louvel jerome.lou...@noelios.comwrote: Hi Cliff, Good suggestion. I've just added this indent property to DomRepresentation in SVN trunk. Its value is true by default. Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* Cliff Binstock [mailto:cliff.binst...@coyotereporting.com] *Envoyé :* vendredi 6 février 2009 00:40 *À :* discuss@restlet.tigris.org *Objet :* RE: DOM formatting Stephen, Thanks … for the input … still seems like it should be more trivial [ DomRepresentation#setIndent(boolean), perhaps ] Cliff Binstock Coyote Reporting -- *From:* Stephen Groucutt [mailto:stephen.grouc...@gmail.com] *Sent:* Thursday, February 05, 2009 1:41 PM *To:* discuss@restlet.tigris.org *Subject:* Re: DOM formatting Hi, Have you considered subclassing DomRepresentation and overriding its createTransformer() method to set the output properties you want (in your case, OutputKeys.INDENT to yes)? I had a case where I had to modify some properties of the XML being produced, and I found that the easiest way to do it was to subclass the representation in this way. On Thu, Feb 5, 2009 at 4:12 PM, Cliff Binstock cliff.binst...@coyotereporting.com wrote: The DOMRepresentation, writes out the DOM as-is. Certainly this is great in most cases. However, it would be nice if there was pretty-print option that provided easy-to-look at XML. Of course, I can (and probably will) run the DOM through my own transformation to pretty-print, but it seems like use case might be a common desire. My current use case is building a Document with Elements, but no Text nodes, so the resultant XML is one unreadable line. If there is an existing trivial way to do this, great. If not, consider this a feature request. Thanks! Cliff Binstock Coyote Reporting -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1112256
Media types
Hello, New mediatypes are static fields of my application class. And I declare new extension in my application constructor. What is the best place to call MediaType#register and MetadaService#addExtension ? At what stage do you think we should include OOo and OOXML mime types in the Restlet standard distribution ? I ask it because MediaType already includes declaration for standard microsoft types. Cheers, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1106556
Re: Media types
Pointers: http://technet.microsoft.com/ja-jp/library/cc179224.aspx http://framework.openoffice.org/documentation/mimetypes/mimetypes.html Rémi On Thu, Feb 5, 2009 at 10:16, Rémi Dewitte r...@gide.net wrote: Hello, New mediatypes are static fields of my application class. And I declare new extension in my application constructor. What is the best place to call MediaType#register and MetadaService#addExtension ? At what stage do you think we should include OOo and OOXML mime types in the Restlet standard distribution ? I ask it because MediaType already includes declaration for standard microsoft types. Cheers, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=1106631
Re: HttpRequest suggestion
Patch submitted ! :) Rémi On Wed, Jan 14, 2009 at 21:31, Jerome Louvel jerome.lou...@noelios.comwrote: Hi Rémi, This remark has been made in the past and we have a RFE for this pending: Add Request#getForwardedAddresses() method http://restlet.tigris.org/issues/show_bug.cgi?id=668 If you have time to work on a patch that would be welcome! :) Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de * Rémi Dewitte *Envoyé :* lundi 12 janvier 2009 17:34 *À :* discuss@restlet.tigris.org *Objet :* HttpRequest suggestion Hello all, When using http forward, I would find more convenient to have the real client address using request.getClientInfo().getAddress() instead of the forwarder component. It means changing line 227 of HttpRequest from result.getAddresses().add(addresses[i].trim()); to result.getAddresses().add(0,addresses[i].trim()); What do you think ? Rémi
Re: Solr integration
Jérôme, Why not to lead the Lucene extension ! I'll do my best. I think that Lucene integration will be really handy with Semantic Web for example to index relations. Cheers, Rémi On Sun, Jan 11, 2009 at 20:37, Jerome Louvel jerome.lou...@noelios.comwrote: Rémi, Sounds good! Also, if you are interested (and have enough available time) to lead the whole Lucene extension, I would be happy to have you as the extension committer, with commit rights, etc. See details about development process here: http://wiki.restlet.org/developers/179-restlet/51-restlet.html?branch=docs-1_1language=en Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de * Rémi Dewitte *Envoyé :* dimanche 11 janvier 2009 19:17 *À :* discuss@restlet.tigris.org *Objet :* Re: Solr integration Jérôme, I'll try to contribute some documentation as soon as possible and possibly look at the Tika stuff too. Have a nice week ! Rémi On Sun, Jan 11, 2009 at 17:41, Jerome Louvel jerome.lou...@noelios.comwrote: Hi Rémi, Sorry for the slow reply! *1) Solr support* First, let me thank you for contributing this class. I went ahead and created the org.restlet.ext.lucene module in SVN trunk with the necessary/minimal library dependencies (for Lucene, Tika, Solr). The build has been updated to include this extension in the Restlet 1.2 distribution. You will also note that I've moved the internal classes in SolrClientHelper up one level to facilitate reuse. I've also completed the Javadocs. So, we are almost there. What is now missing is some proper user documentation. I've created a new developer page on the wiki where you and others can provide this info: Lucene extension http://wiki.restlet.org/developers/172-restlet/215-restlet.html Once we get the User Guide ready for Restlet 1.2, we'll migrate the user related content there. *2) Tika support* In addition to the Solr client connector, I have also added a TikaRepresentation to facilitate the extraction of metadata from any representation supported by Tika parsers. Hope this helps! Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de* Rémi Dewitte *Envoyé :* mardi 30 décembre 2008 13:16 *À :* discuss@restlet.tigris.org *Objet :* Re: Solr integration Hi ! Basically it allows you to interact with solr with solr:// references the same way you would do it through http : http://wiki.apache.org/solr/SolrRequestHandler It can be seen as a way to deploy solr as a Restlet application instead of in a servlet container. I have uploaded the SolrClientHelper.java on http://restlet.tigris.org/issues/show_bug.cgi?id=697. About creating an extension, I still struggle a bit on how define dependencies to 3rd party jars. Is there a tool to create all the boilerplate in librairies/ directory from this maven dependency ? dependency groupIdorg.apache.solr/groupId artifactIdsolr-core/artifactId version1.3.0/version /dependency Regards, Rémi On Sun, Dec 28, 2008 at 13:17, Jerome Louvel jerome.lou...@noelios.comwrote: Hi all, Providing Lucene-based search/indexing features sounds like a generic and very useful feature. If the best way to facilitate this integration in Restlet is to leverage Solr, then we should definitely consider a new Restlet extension. I've created a RFE to track this idea: Add support for Lucene/Solr http://restlet.tigris.org/issues/show_bug.cgi?id=697 Rémi, could you describe how your client connector works? Which use cases does it handle? Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* Ben Johnson [mailto:ben.john...@jandpconsulting.co.uk] *Envoyé :* vendredi 26 décembre 2008 19:23 *À :* discuss@restlet.tigris.org *Objet :* Re: Solr integration Hi Rémi I have been considering using Solr with Tika ( http://lucene.grantingersoll.com/2008/12/06/tika-and-solr/) to index text-based documents - mainly PDF I think - with associated XML 'metadata' documents (which would also be indexed with Solr) via Restlet, so I would be interested in what you have come up with. I have been trying to set this up in a Geronimo-Jetty environment, but running into a few issues (such as how to deploy to Solr via the Geronimo admin web page - I'm very new to all this). From what I understand, although Tika has been integrated into Solr, it is scheduled for Solr 1.4 which has
HttpRequest suggestion
Hello all, When using http forward, I would find more convenient to have the real client address using request.getClientInfo().getAddress() instead of the forwarder component. It means changing line 227 of HttpRequest from result.getAddresses().add(addresses[i].trim()); to result.getAddresses().add(0,addresses[i].trim()); What do you think ? Rémi
Re: Solr integration
Jérôme, I'll try to contribute some documentation as soon as possible and possibly look at the Tika stuff too. Have a nice week ! Rémi On Sun, Jan 11, 2009 at 17:41, Jerome Louvel jerome.lou...@noelios.comwrote: Hi Rémi, Sorry for the slow reply! *1) Solr support* First, let me thank you for contributing this class. I went ahead and created the org.restlet.ext.lucene module in SVN trunk with the necessary/minimal library dependencies (for Lucene, Tika, Solr). The build has been updated to include this extension in the Restlet 1.2 distribution. You will also note that I've moved the internal classes in SolrClientHelper up one level to facilitate reuse. I've also completed the Javadocs. So, we are almost there. What is now missing is some proper user documentation. I've created a new developer page on the wiki where you and others can provide this info: Lucene extension http://wiki.restlet.org/developers/172-restlet/215-restlet.html Once we get the User Guide ready for Restlet 1.2, we'll migrate the user related content there. *2) Tika support* In addition to the Solr client connector, I have also added a TikaRepresentation to facilitate the extraction of metadata from any representation supported by Tika parsers. Hope this helps! Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* remidewi...@gmail.com [mailto:remidewi...@gmail.com] *De la part de * Rémi Dewitte *Envoyé :* mardi 30 décembre 2008 13:16 *À :* discuss@restlet.tigris.org *Objet :* Re: Solr integration Hi ! Basically it allows you to interact with solr with solr:// references the same way you would do it through http : http://wiki.apache.org/solr/SolrRequestHandler It can be seen as a way to deploy solr as a Restlet application instead of in a servlet container. I have uploaded the SolrClientHelper.java on http://restlet.tigris.org/issues/show_bug.cgi?id=697. About creating an extension, I still struggle a bit on how define dependencies to 3rd party jars. Is there a tool to create all the boilerplate in librairies/ directory from this maven dependency ? dependency groupIdorg.apache.solr/groupId artifactIdsolr-core/artifactId version1.3.0/version /dependency Regards, Rémi On Sun, Dec 28, 2008 at 13:17, Jerome Louvel jerome.lou...@noelios.comwrote: Hi all, Providing Lucene-based search/indexing features sounds like a generic and very useful feature. If the best way to facilitate this integration in Restlet is to leverage Solr, then we should definitely consider a new Restlet extension. I've created a RFE to track this idea: Add support for Lucene/Solr http://restlet.tigris.org/issues/show_bug.cgi?id=697 Rémi, could you describe how your client connector works? Which use cases does it handle? Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* Ben Johnson [mailto:ben.john...@jandpconsulting.co.uk] *Envoyé :* vendredi 26 décembre 2008 19:23 *À :* discuss@restlet.tigris.org *Objet :* Re: Solr integration Hi Rémi I have been considering using Solr with Tika ( http://lucene.grantingersoll.com/2008/12/06/tika-and-solr/) to index text-based documents - mainly PDF I think - with associated XML 'metadata' documents (which would also be indexed with Solr) via Restlet, so I would be interested in what you have come up with. I have been trying to set this up in a Geronimo-Jetty environment, but running into a few issues (such as how to deploy to Solr via the Geronimo admin web page - I'm very new to all this). From what I understand, although Tika has been integrated into Solr, it is scheduled for Solr 1.4 which has not been released yet, so I need to get the latest Solr source code and build that to get this integration - not sure if you've looked into that or not. Cheers Ben *From:* Rémi Dewitte r...@gide.net *Sent:* Friday, December 26, 2008 1:45 PM *To:* discuss@restlet.tigris.org *Subject:* Solr integration Hello, While doing some cleanup to contribute to the authentication work, I thought I could give a restlet integration of Solrhttp://lucene.apache.org/solr/ . Basically it is a ClientHelper handling solr://... request. I just need to know whether someone is interested in it. Cheers, Rémi
Re: Solr integration
Hi ! Basically it allows you to interact with solr with solr:// references the same way you would do it through http : http://wiki.apache.org/solr/SolrRequestHandler It can be seen as a way to deploy solr as a Restlet application instead of in a servlet container. I have uploaded the SolrClientHelper.java on http://restlet.tigris.org/issues/show_bug.cgi?id=697. About creating an extension, I still struggle a bit on how define dependencies to 3rd party jars. Is there a tool to create all the boilerplate in librairies/ directory from this maven dependency ? dependency groupIdorg.apache.solr/groupId artifactIdsolr-core/artifactId version1.3.0/version /dependency Regards, Rémi On Sun, Dec 28, 2008 at 13:17, Jerome Louvel jerome.lou...@noelios.comwrote: Hi all, Providing Lucene-based search/indexing features sounds like a generic and very useful feature. If the best way to facilitate this integration in Restlet is to leverage Solr, then we should definitely consider a new Restlet extension. I've created a RFE to track this idea: Add support for Lucene/Solr http://restlet.tigris.org/issues/show_bug.cgi?id=697 Rémi, could you describe how your client connector works? Which use cases does it handle? Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* Ben Johnson [mailto:ben.john...@jandpconsulting.co.uk] *Envoyé :* vendredi 26 décembre 2008 19:23 *À :* discuss@restlet.tigris.org *Objet :* Re: Solr integration Hi Rémi I have been considering using Solr with Tika ( http://lucene.grantingersoll.com/2008/12/06/tika-and-solr/) to index text-based documents - mainly PDF I think - with associated XML 'metadata' documents (which would also be indexed with Solr) via Restlet, so I would be interested in what you have come up with. I have been trying to set this up in a Geronimo-Jetty environment, but running into a few issues (such as how to deploy to Solr via the Geronimo admin web page - I'm very new to all this). From what I understand, although Tika has been integrated into Solr, it is scheduled for Solr 1.4 which has not been released yet, so I need to get the latest Solr source code and build that to get this integration - not sure if you've looked into that or not. Cheers Ben *From:* Rémi Dewitte r...@gide.net *Sent:* Friday, December 26, 2008 1:45 PM *To:* discuss@restlet.tigris.org *Subject:* Solr integration Hello, While doing some cleanup to contribute to the authentication work, I thought I could give a restlet integration of Solrhttp://lucene.apache.org/solr/ . Basically it is a ClientHelper handling solr://... request. I just need to know whether someone is interested in it. Cheers, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=995878
Re: securing Restlet
Jerome, I will do all the necessary to allow the code to be integrated as soon as possible. A little description of what I will submit. Few lines to describe a little bit more what's in the CookieGuard : - guard intercepts /login and /logout path requests, the behaviour is of customizable - on /login, it performs authentication thanks to the SecretResolver and set a ChallengeResponse to the request - on /logout, make the cookie expires now - on any other request, try to decrypt the cookie and set a ChallengeResponse to the request What's in the cookie = value of the cookie ? - the username - a timestamp We could embed even more information from the client but i don't really think it is necessary. Is it secure ? - Yes the value is encrypted thanks to a Cipher (from JRE), making difficult to read values embedded in the cookie. - timestamp embedded in the cookie allows to check for expiration serverside without storing anything, making difficult to exploit a stolen cookie for a long time. Client is responsible from maintaining the state. It is stateless. It is fast. In the code you can also find some code to read (and write) passwords from a standard htpasswd file addressing in a different way issue 485http://restlet.tigris.org/issues/show_bug.cgi?id=485 . Also my authoriseMissing suggestion renamed as optionalAuthentication in the code. Rémi On Fri, Dec 26, 2008 at 11:05, Jerome Louvel jerome.lou...@noelios.comwrote: Hi Stephan, I've added a link from the RFE to Remi's implementation: Support cookie based authentication http://restlet.tigris.org/issues/show_bug.cgi?id=605 However, we would need Remi to offer his implementation to Restlet code base in order to consider this integration. Remi, see this page if you are interested in contributing your code: http://www.restlet.org/community/contribute Also, Rob Heittman previously a CookieUtility class to the public domain: http://gogoego.googlecode.com/svn/trunk/modules/RestletFoundation/src/com/solertium/container/CookieUtility.java Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -Message d'origine- De : Stephan Koops [mailto:stephan.ko...@web.de] Envoyé : lundi 22 décembre 2008 19:32 À : discuss@restlet.tigris.org Objet : Re: securing Restlet Hi Rémi, cool. Jerome, Thierry: Could we add it to the code base, if the security is refactored? best regards Stephan I have made a cookie authentication for restlet. Here is the code. Few things might not be clean but it works quite fine. I hope it helps. Rémi ___ Täglich 1.000.000 Euro gewinnen! Jetzt kostenlos WEB.DE MillionenKlick spielen! https://millionenklick.web.de/?mc=m...@footer.mklick@home -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=989993 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=992857 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=992930
ApplicationStatusFilter - bug ???
Hello, I just wonder if it is a bug having in ApplicationStatusFilter : public ApplicationStatusFilter(Application application) { super(application.getContext(), application.getStatusService() .isOverwrite(), application.getStatusService() .getContactEmail(), /); } instead of something like that : public ApplicationStatusFilter(Application application) { super(application.getContext(), application.getStatusService() .isOverwrite(), application.getStatusService() .getContactEmail(), application.getStatusService().getHomeRef().getTargetRef().toString()); } Because that way doing this on Application initialization has no effect: getStatusService().setHomeRef(new Reference(/some/path/)); Cheers, Rémi -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=982829
Re: Guard suggestion
Hello, For example you have an application where you want to display various informations with different levels of information. There is an interface to manage rules for authorizations. One of the rule could be to authorize all users to access the resource or only authorized or only specific users, etc. It is up to the authorize method to trigger 401 responses... Rémi On Tue, Nov 18, 2008 at 09:34, Jerome Louvel [EMAIL PROTECTED]wrote: Hi Rémi, I have added your suggestion to the RFE mentioned by Stephan: Refactor authentication and authorization http://restlet.tigris.org/issues/show_bug.cgi?id=505 Do you have examples in mind where it would be nice to authorize unauthenticated client requests ? Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -- *De :* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *De la part de * Rémi Dewitte *Envoyé :* vendredi 14 novembre 2008 23:27 *À :* discuss@restlet.tigris.org *Objet :* Re: Guard suggestion It would also let the autorize() method to decide whether AuthenticationMissing forbids the response or not. For a resource, authorized clients might have more details for example. Rémi On Fri, Nov 14, 2008 at 21:17, Stephan Koops [EMAIL PROTECTED] wrote: Hi Rémi, You mean, that a client can authorize himself, but it is not required? I think this is a good ideas. For browser applications I don't now, if browsers could work with this. The authentication should be reworked in the near future (I don't know te current timetable for this). If your proposal is missing then, throw it into the discussion again. best regards Stephan Rémi Dewitte schrieb: Hello all, Let me make a suggestion about the Guard class. It would allow the authorize method to make a decision even if no authentication is present. Why not adding an authorizeMissing attribute and change handling of AUTHENTICATION_MISSING in doHandle method from challenge(response, false); to if(isAuthorizeMissing() authorize(request)){ accept(request, response); }else{ challenge(response, false); } Cheers, Rémi
Guard suggestion
Hello all, Let me make a suggestion about the Guard class. It would allow the authorize method to make a decision even if no authentication is present. Why not adding an authorizeMissing attribute and change handling of AUTHENTICATION_MISSING in doHandle method from challenge(response, false); to if(isAuthorizeMissing() authorize(request)){ accept(request, response); }else{ challenge(response, false); } Cheers, Rémi
Guard suggestion
Hello all, Let me make a suggestion about the Guard class. It would allow the authorize method to make a decision even if no authentication is present. Why not adding an authorizeMissing attribute and change handling of AUTHENTICATION_MISSING in doHandle method from challenge(response, false); to if(isAuthorizeMissing() authorize(request)){ accept(request, response); }else{ challenge(response, false); } Cheers, Rémi
Re: Guard suggestion
It would also let the autorize() method to decide whether AuthenticationMissing forbids the response or not. For a resource, authorized clients might have more details for example. Rémi On Fri, Nov 14, 2008 at 21:17, Stephan Koops [EMAIL PROTECTED] wrote: Hi Rémi, You mean, that a client can authorize himself, but it is not required? I think this is a good ideas. For browser applications I don't now, if browsers could work with this. The authentication should be reworked in the near future (I don't know te current timetable for this). If your proposal is missing then, throw it into the discussion again. best regards Stephan Rémi Dewitte schrieb: Hello all, Let me make a suggestion about the Guard class. It would allow the authorize method to make a decision even if no authentication is present. Why not adding an authorizeMissing attribute and change handling of AUTHENTICATION_MISSING in doHandle method from challenge(response, false); to if(isAuthorizeMissing() authorize(request)){ accept(request, response); }else{ challenge(response, false); } Cheers, Rémi
Sockets not closed with restlet dev
Hello, I have not been able to investigate very long but I think there is a bug in the NRE http connector. It does not closes well network sockets. You end up having too many files opened exception from java. Using java 1.6.0_07 on linux redhat and fedora. Using lsof you have a new line as such for every request : java25902 webmaster 45u sock0,4 70867650 can't identify protocol The immediate workarround for me was to use the grizzly connector. I have checked it did not come from my application but even with a simple resource using a StringRepresentation the bug is there. I am sorry I will be off for a while from today evening and will not be able to investigate to help. Has anyone noticed the bug ? Remi
Re: Issue in FileClientHelper
Thierry, Here the sample code which reproduce the bug. I am going to test again with the svn version. Sorry for the lag. Thanks. Rémi On Thu, Jul 3, 2008 at 10:00 AM, Thierry Boileau [EMAIL PROTECTED] wrote: Hi Rémi, thanks for your report, it helps fixing a bug in the FileClientHelper. The fix is now available in the svn repositories (Restlet 1.0 and 1.1). Could you try again and tell us if it solves your problem? best regards, Thierry Boileau Yes I have the TunnelService on but off for extensions. The FileClientHelper search for a file with file starting with the same baseName and having the same set of extensions : no surprise it finds test2.xml. I'll be off for the end of the week. I will test it as soon as possible and investigate a bit more on this. Thanks for the fast feedback ! RÃ(c)mi On Wed, Jul 2, 2008 at 6:09 PM, Thierry Boileau [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: Hello RÃ(c)mi, I'm not able to reproduce your problem with Restlet 1.1M4. I send you my sample code. It contains a directory and 2 restlet, one that creates/updates the test.xml file, the other the test2.xml file. Just hot http://localhost:8182/restletPut1 and http://localhost:8182/restletPut2 to invoke them. Are you using some filter? such as TunnelFilter? best regards, Thierry Boileau Hello, I have an issue with the implementation of PUT on files. Let say I have files in a directory : test.xml test2.xml If I make a PUT on test.xml it will modify test2.xml which is not exactilly what I would expect. I don't really catch what I don't understand reading from line 187 to line 219 in FileClientHelper. If it is not a bug what should I do ? I am using this line of code : Response resp = Application.getCurrent().getContext().getClientDispatcher().put(resourceUri,new DomRepresentation(MediaType.TEXT_XML,doc)); I am using Restlet 1.1M4. Thanks a lot, RÃ(c)mi package testPut; import org.restlet.Application; import org.restlet.Component; import org.restlet.Context; import org.restlet.Restlet; import org.restlet.Router; import org.restlet.data.MediaType; import org.restlet.data.Protocol; import org.restlet.data.Request; import org.restlet.data.Response; import org.restlet.resource.DomRepresentation; import org.restlet.resource.Representation; import org.restlet.resource.StringRepresentation; public class TestApplication extends Application { public static void main(String[] args) { Component component = new Component(); component.getServers().add(Protocol.HTTP, 8182); component.getClients().add(Protocol.HTTP); component.getClients().add(Protocol.FILE); component.getDefaultHost().attachDefault(new TestApplication(component.getContext())); try { component.start(); } catch (Exception e) { } } public TestApplication(Context parentContext) { super(parentContext); } @Override public Restlet createRoot() { Router router = new Router(getContext()); // Restlet that puts a representation to file test.xml Restlet restletPut1 = new Restlet(getContext()) { @Override public void handle(Request request, Response response) { Representation xmlRep = new StringRepresentation(ab/a, MediaType.TEXT_XML); DomRepresentation domRepresentation = new DomRepresentation(xmlRep); Response resp = getContext().getClientDispatcher().put(file:///tmp/test.xml, domRepresentation); response.setEntity(resp.getEntity()); response.setStatus(resp.getStatus()); } }; // Restlet that puts a representation to file test2.xml Restlet restletPut2 = new Restlet(getContext()) { @Override public void handle(Request request, Response response) { Representation xmlRep = new StringRepresentation(cd/c, MediaType.TEXT_XML); DomRepresentation domRepresentation = new DomRepresentation(xmlRep); Response resp = getContext().getClientDispatcher().put(file:///tmp/test2.xml, domRepresentation); response.setEntity(resp.getEntity()); response.setStatus(resp.getStatus()); } }; router.attach(/restletPut1, restletPut1); router.attach(/restletPut2, restletPut2); return router; } }
Re: Issue in FileClientHelper
Everything is working as expected right now. Thanks ! Rémi On Wed, Jul 16, 2008 at 11:52 AM, Rémi Dewitte [EMAIL PROTECTED] wrote: Thierry, Here the sample code which reproduce the bug. I am going to test again with the svn version. Sorry for the lag. Thanks. Rémi On Thu, Jul 3, 2008 at 10:00 AM, Thierry Boileau [EMAIL PROTECTED] wrote: Hi Rémi, thanks for your report, it helps fixing a bug in the FileClientHelper. The fix is now available in the svn repositories (Restlet 1.0 and 1.1). Could you try again and tell us if it solves your problem? best regards, Thierry Boileau Yes I have the TunnelService on but off for extensions. The FileClientHelper search for a file with file starting with the same baseName and having the same set of extensions : no surprise it finds test2.xml. I'll be off for the end of the week. I will test it as soon as possible and investigate a bit more on this. Thanks for the fast feedback ! RÃ(c)mi On Wed, Jul 2, 2008 at 6:09 PM, Thierry Boileau [EMAIL PROTECTED]mailto: [EMAIL PROTECTED] wrote: Hello RÃ(c)mi, I'm not able to reproduce your problem with Restlet 1.1M4. I send you my sample code. It contains a directory and 2 restlet, one that creates/updates the test.xml file, the other the test2.xml file. Just hot http://localhost:8182/restletPut1 and http://localhost:8182/restletPut2 to invoke them. Are you using some filter? such as TunnelFilter? best regards, Thierry Boileau Hello, I have an issue with the implementation of PUT on files. Let say I have files in a directory : test.xml test2.xml If I make a PUT on test.xml it will modify test2.xml which is not exactilly what I would expect. I don't really catch what I don't understand reading from line 187 to line 219 in FileClientHelper. If it is not a bug what should I do ? I am using this line of code : Response resp = Application.getCurrent().getContext().getClientDispatcher().put(resourceUri,new DomRepresentation(MediaType.TEXT_XML,doc)); I am using Restlet 1.1M4. Thanks a lot, RÃ(c)mi
Re: XForm integration with the RestLet framework possible?
I don't know very well about OPS. I just like to let you know that I have been able to integrate successfully (so far) Saxon and Restlet. I might publish it as an extension. Basically, Restlet does the handling of requests delegating processing to xqueries. All the application logic and presentation logic is written with xquery. I don't really know what kind of framework you would like to use to connect to your datasources but I think that Restlet has no builtin for these concerns. Hope it helps, Rémi On Tue, Jul 8, 2008 at 1:30 AM, ilango [EMAIL PROTECTED] wrote: Hi Could you elaborate more on this Resource subclass? thanks ilango --- On *Mon, 7/7/08, Avi Flax [EMAIL PROTECTED]* wrote: From: Avi Flax [EMAIL PROTECTED] Subject: Re: XForm integration with the RestLet framework possible? To: discuss@restlet.tigris.org Date: Monday, July 7, 2008, 3:39 PM On Fri, Jul 4, 2008 at 3:41 PM, ilango [EMAIL PROTECTED] wrote: I have an XForm built on the OPS XForms processor. Rather than use the OPS pipelines for connecting my XForms to datasources I would like to use the Restlet Framework to connect my XForm fields to datasources like MySQL, a Web Service, XML databases like eXist, etc. I would like to get XML data into my XForm, regardless of the type of datasource. I'm not feeling this. Not sure this is something that the framework, or even an extension, should handle. Could be a slippery slope towards the framework trying to be everything for everyone. Why not just write the glue yourself in a Resource subclass? -- Avi Flax » Lead Technologist » Partner » Arc90 » http://arc90.com
Issue in FileClientHelper
Hello, I have an issue with the implementation of PUT on files. Let say I have files in a directory : test.xml test2.xml If I make a PUT on test.xml it will modify test2.xml which is not exactilly what I would expect. I don't really catch what I don't understand reading from line 187 to line 219 in FileClientHelper. If it is not a bug what should I do ? I am using this line of code : Response resp = Application.getCurrent().getContext().getClientDispatcher().put(resourceUri,new DomRepresentation(MediaType.TEXT_XML,doc)); I am using Restlet 1.1M4. Thanks a lot, Rémi
Re: Issue in FileClientHelper
Yes I have the TunnelService on but off for extensions. The FileClientHelper search for a file with file starting with the same baseName and having the same set of extensions : no surprise it finds test2.xml. I'll be off for the end of the week. I will test it as soon as possible and investigate a bit more on this. Thanks for the fast feedback ! Rémi On Wed, Jul 2, 2008 at 6:09 PM, Thierry Boileau [EMAIL PROTECTED] wrote: Hello Rémi, I'm not able to reproduce your problem with Restlet 1.1M4. I send you my sample code. It contains a directory and 2 restlet, one that creates/updates the test.xml file, the other the test2.xml file. Just hot http://localhost:8182/restletPut1 and http://localhost:8182/restletPut2 to invoke them. Are you using some filter? such as TunnelFilter? best regards, Thierry Boileau Hello, I have an issue with the implementation of PUT on files. Let say I have files in a directory : test.xml test2.xml If I make a PUT on test.xml it will modify test2.xml which is not exactilly what I would expect. I don't really catch what I don't understand reading from line 187 to line 219 in FileClientHelper. If it is not a bug what should I do ? I am using this line of code : Response resp = Application.getCurrent().getContext().getClientDispatcher().put(resourceUri,new DomRepresentation(MediaType.TEXT_XML,doc)); I am using Restlet 1.1M4. Thanks a lot, RÃ(c)mi