Integrating WADL and Spring

2009-03-06 Thread David Bordoley
Hi All, I've been playing around with Restlet for some projects I'm working on and have really enjoyed the platform. I'm wondering if there is a way to define your service in a WADL document but still use Spring to configure all your applications Resources, etc. In the abstract what I would like t

Re: Integrating WADL and Spring

2009-03-06 Thread David Bordoley
On Fri, Mar 6, 2009 at 11:32 AM, Rhett Sutphin wrote: > This would be an RFE (at least, I'm not aware of any way to get it to > work currently).  I'm curious about how you would tie the resources in > your application context to the WADL.  Would you add a custom > attribute for the spring bean id

Re: Integrating WADL and Spring

2009-03-09 Thread David Bordoley
@restlet.tigris.org > Objet : Re: Integrating WADL and Spring > > Hi David, > > On Mar 6, 2009, at 4:10 PM, David Bordoley wrote: > >> On Fri, Mar 6, 2009 at 11:32 AM, Rhett Sutphin >> wrote: >> >>> This would be an RFE (at least, I'm not aware of any w

Re: File upload - as stream

2009-03-09 Thread David Bordoley
Apache File Upload supports a stream API. (see http://commons.apache.org/fileupload/streaming.html) You should be able to use it with RestletFileUpload. dave On Sun, Mar 8, 2009 at 10:41 AM, Matt Rutherford wrote: > Hi. > > Is there a way to receive a file element from an html form without stori

Re: Resource factories

2009-03-23 Thread David Bordoley
Out of curiosity is there a reason why Resource isn't implemented as a subclass of Restlet? It seams like there is a lot of overhead in initializing a new Resource on every request especially when a lot of salient features such as what methods,variants, etc that are supported tend to static for a g

Re: ServerResource conditional mode

2009-04-10 Thread David Bordoley
Have you considered that having a generic server resource might be a bit to simplistic or not granular enough? I guess from my point of view the resource class is really the implementation of the gritty protocol details of your application. I'm wondering if at least in addition to ServerResource, i

Re: Distributed Observer Pattern

2009-04-21 Thread David Bordoley
You might want to check out the following IETF draft that proposes a standard for doing this with SIP. You'd probably want to follow at least the style of this proposal in your implementation. http://www.ietf.org/internet-drafts/draft-roach-sip-http-subscribe-01.txt dave On Mon, Apr 20, 2009 at

Re: Licensing question

2009-07-14 Thread David Bordoley
Its probably worth mentioning that javax.xml.stream is part of the core Java SDK in version 1.6. I suppose that it is included in the Restlet distribution only to support building on java 1.5. If you're concerned you could distro your application against version 1.6 of Java. Also I doubt that javax

Re: how to unsubcribe

2009-07-14 Thread David Bordoley
Log into your tigris account at restlet.tigris.org. In the discussions section, there is a link to manage your subscriptions. Pretty self explanatory from there. dave On Tue, Jul 14, 2009 at 11:41 AM, ilango wrote: > Hi > I want to unsubscribe from this group. How would I do that? > > thanks > il

Re: Receive a multipart HTTP response

2009-07-17 Thread David Bordoley
Check out org.restlet.ext.fileupload. Its a representation wrapper around apache file upload that will allow you to parse multipart uploads. dave On Fri, Jul 17, 2009 at 8:02 AM, Evgeny Shepelyuk wrote: > Hello > > We're about to develop application that should read data from video camera. > Data

Re: REST in mobiles

2009-07-17 Thread David Bordoley
You can definitely run a web server on your phone. The bigger issue you will encounter is that your mobile device almost definitely doesn't have a routable IP and is most likely behind several NATs and FWs. What are you trying to do? dave On Fri, Jul 17, 2009 at 4:14 AM, feda abdul wrote: > I am

Re: Guidance on Atom/APP in Restlet

2009-07-17 Thread David Bordoley
One way I've worked with Atom services within Restlet is to use freemarker templates to generate atom representations and use an XML parser to parse entity bodies of APP POST/PUT requests. This allows me to extract the data I'm interested in without pulling the whole Atom tree into memory as Rome w

Re: Receive a multipart HTTP response

2009-07-20 Thread David Bordoley
On Fri, Jul 17, 2009 at 12:02 PM, Evgeny Shepelyuk wrote: > 2. we need to read long time multipart HTTP response item by item > 3. i think FileUpload extension will work only after complete read of input > stream. but in our case the request is "never" finished and the items should > be read from s

Re: Guidance on Atom/APP in Restlet

2009-07-21 Thread David Bordoley
On Tue, Jul 21, 2009 at 6:08 AM, Tim Peierls wrote: > Hmm, the wind is going out of my sails. I started by recognizing that > AtomPub seemed to be a natural fit for my domain, and now I'm looking at > JSON/serialized beans and "optional" plain Atom feeds. (Optional in the > sense that my main appli

Re: GET and POST - Semantics vs. Function

2009-09-14 Thread David Bordoley
Hi Andrew, It might be more useful if you could supply a more detailed example that is causing you headaches. Really the difference between POST and GET is idempotence. GET operations must be idempotent, not having side effects, while POST operations may have side effects as defined by the server.

Bug with getClientInfo().getPreferredVariant()

2009-11-22 Thread David Bordoley
The HTTP spec section 14.1 states: "If no Accept header field is present, then it is assumed that the client accepts all media types. If an Accept header field is present, and if the server cannot send a response which is acceptable according to the combined Accept field value, then the server SHOU

Re: Newbie question about passing JSON object in a get request

2009-11-22 Thread David Bordoley
If you're passing the JSON object as part of the URL it must be URL encoded. Dave On Sat, Nov 21, 2009 at 7:51 PM, Steven Headley wrote: > I am trying to pass a JSON object in a restlet client get request as follows: > > final Client client = new Client(Protocol.HTTP); >                        

Supporting multiple types of authorization for a given route

2009-12-05 Thread David Bordoley
I was wondering if anyone had experience offering multiple types of authorization (HTTP BASIC, HTTP DIGEST, OAUTH, etc.) for a given route using Restlet. It isn't immediately apparent to me what the best way to do this is using the ChallengeAuthenticator class. Also what is the status of the 1.1 OA

Re: XML format in ATOM content element

2009-12-07 Thread David Bordoley
Not sure about your formatting problem, but I thought i'd mention that you need to add a namespace declaration (at the minimum use the default namespace) on the XML within your atom:content element, otherwise an XML processor is going to assume that your XML is in the Atom namespace and many proces

Re: RESTful batch operations

2010-02-02 Thread David Bordoley
The philosophical answer: RESTful HTTP doesn't have semantics to support BATCH operations. There has been conversations in the IETF about supporting a BATCH method, but it hasn't really gone anywhere. For servers that support HTTP pipelining you can issue multiple asynchronous GET requests, but I

Re: Protobuf, protocolbuffer

2010-04-22 Thread David Bordoley
A while back I wrote a Restlet Representation that could be used for wrapping a protobuf. The code is in the issue tracker, but i never got around to cleaning it up such that it could be checked in. Unfortunately my current job makes contributing to Restlet (or any open source project) a bit painfu