Re: Restlet mention in Dion Hinchcliffe blog
Jerome Louvel wrote: Thanks for finding this post, this is cool! I've just published a related note: http://blog.noelios.com/2006/09/12/restlet-blog-coverage/ Sure thing! BTW, I updated the sample app a week or so ago to reflect the released beta 18. (I think I forgot to post a notice to the list.) I also have some ideas based on the actual app I'm creating, including some updated code to work with Spring -- I'll try and write those up soon. Hope your vacation was great! Chris
svn build error with Jetty6
FYI, building the project with a recent SVN update gave: [javac] Compiling 4 source files to ...\trunk\build\classes\com.noelios.restlet.ext.jetty_6.0 [javac] ...\trunk\plugins\internal\com.noelios.restlet.ext.jetty_6.0\src\com\noelios\restlet\ext\jetty\HttpsServer.java:108: cannot find symbol [javac] symbol : method setAlgorithm(java.lang.String) [javac] location: class org.mortbay.jetty.security.SslSocketConnector [javac] connector.setAlgorithm(getCertAlgorithm()); [javac] ^ [javac] 1 error I'm not using Jetty 6 right now so I just commented out that line and everything else built fine. Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.
Re: managing URIs?
(picking up a thread from a few days ago about retrieving client headers ...) Jerome Louvel wrote: ... That's exactly the plan, allow the creation of a custom Call (subclass if necessary) from the ConnectorCall or the other way around for client connectors. So now I've hit the 'other way around' part of your clause. Say I'm allowing the client to create a resource with: POST /authors Content-Type: application/xml ... author.../author IIRC the standard practice in REST apps is to return a 'Created' status along with the location of the newly created entity: 201 Created Location: /author/115 ... So my question is: can I currently (in SVN code) give the client the 'Location' as specified here? Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.
updated sample app: POST new resources
I've added to the silly sample app the ability to create new resources via POST. Instructions are same as before: unzip, exec 'ant run'. http://www.cwinters.com/raw/RestSampleBook.zip Have fun! Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.
Re: error running b18 on Simple
Chris Winters wrote: Jerome Louvel wrote: Thanks for reporting this regression. It's fixed it in SVN. Make sure you fully refresh your local copy. Wow, lots of updates! And more API breaks :-) I'll plow through those and let you know how it goes. BTW, thanks for keeping up the relatively detailed notes the changelog. I know it's a PITA to do but much appreciated. Okay, that didn't take too long. Mostly just the MediaType/s collapsing (which is nice). Another thing I noticed is that using a base filename in the DirectoryHandler no longer works. My older code had: DirectoryHandler staticFiles = new DirectoryHandler( this, webUri, index ); which didn't pull up the 'index.html' page on a directory request. Changing it to: DirectoryHandler staticFiles = new DirectoryHandler( this, webUri, index.html ); worked fine. Do you think it's a good idea to have a set of possible files, similar to the Apache directive? I'll post a link to the silly sample app in a few minutes. Thanks for the updates! Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.
Re: silly sample app available
Piyush Purang wrote: Where is it available? Did I miss a few emails here? It was in the first message in the thread: Location: http://www.cwinters.com/raw/RestSampleBook.zip Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.
Re: Resources and Representations
Jerome Louvel wrote: ... Agreed, the tutorial needs to be refocused. I'm considering writing a separate tutorial that will focus only on Restlet Applications, Resources and Representations, going through a more real life example. If Chris Winters wants to contribute his BookStore application to the project, maybe we can get this done faster :-) I need to justify my architecture decisions this morning, but I hope to have something a little interesting available by this afternoon. Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.
Re: managing URIs?
Jerome Louvel wrote: Currently, the recommended way is to use the HTTP client as explained here: http://www.restlet.org/tutorial#part02 Then you can check the call's status to see if an error was returned. That's useful if you don't know in advance if it's internal or external You could also use Call.forward() for internal dispatching only. Note that this logic is being moved to Call.context in beta 18. ...but if it's internal this makes more sense. Great. One question about b18. In the changes you have: - Removed requestHeader and responseHeader variables from CallModel. While I see they're now accessed from the ConnectorCall interface, they don't seem to be accessible from the Call class or any of its properties. How can a Restlet (like a filter) get access to the data? Thanks, Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.
error running b18 on Simple
On grabbing b18 from svn and compiling, my sample app dies immediately on any request with: Aug 9, 2006 6:16:54 PM com.noelios.restlet.connector.AbstractHttpServer handle WARNING: Error while handling an HTTP server call: Aug 9, 2006 6:16:54 PM com.noelios.restlet.connector.AbstractHttpServer handle INFO: Error while handling an HTTP server call java.lang.NullPointerException at org.restlet.connector.AbstractServer.handle(AbstractServer.java:66) at com.noelios.restlet.connector.AbstractHttpServer.handle(AbstractHttpServer.java:86) at com.noelios.restlet.connector.AbstractHttpServer.handle(AbstractHttpServer.java:67) at com.noelios.restlet.ext.simple.SimpleServer.handle(SimpleServer.java:134) at simple.http.Dispatcher.run(Unknown Source) at simple.util.process.Daemon.execute(Unknown Source) at simple.util.process.Daemon.run(Unknown Source) It looks like the 'target' property of AbstractServer isn't being assigned. Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.
Re: dispatching into a restlet server without HTTP
John D. Mitchell wrote: You might want to look at the code for the existing connectors to see what's involved. That's the plan -- I'm not averse to plugging through this myself, but I wanted to make sure there wasn't any fundamental problem before getting into it. Lazy answer, I know ;-) Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.
Re: Accept header vs. explicit (was: RE: representations + caching (ETags, etc.))
John D. Mitchell wrote: FWIW, I don't find relying on the accept header to be reliable because of these kinds of issues. Even if you do support the accept header, it seems to be a good idea to also support the explicit specifying of the type in the link such as .xml/.json/etc. An example of this is the Zimbra API, IIRC. That's a good idea; but I'm not too worried about lock-in since I figure the code is readily available to choose the best variant based on a file extension versus the Accept header. That would probably be a useful tutorial though :-) Chris -- Chris Winters ([EMAIL PROTECTED]) Lead Software Developer Vocollect Healthcare Systems CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.