On Nov 30, 2008, at 8:12 AM, Mike McNally wrote: > I've been poking around trying to figure out a good "harmonious" way > to provide a set of "web service" URLs as part of an application. By > "web service" I don't necessarily mean any particular approach (SOAP > or whatever) at this point. What I would like is to have some > mechanism that could make an incoming HTTP POST to a service URL end > up looking more-or-less like a plain old action invocation (possibly > with the payload in the form of a FileBean). > > So I'm thinking that one way to do this would be to use a filter that > does something like what the multipart filter does. It'd have to > interpret any sort of authentication header and then package up the > payload as a parameter. Does that seem like a bad idea for some > reason? I'm not terribly experienced with Stripes, and the web service > APIs I'm familiar with are implemented as independent servlets.
I don't see why you need any special anything to do this. Stripes already responds appropriately to HTTP requests (well, POST and GET, and it doesn't distinguish between the two, but that seems to be OK with what you're talking about) and does what you want. That is it reads the request, binds the parameters (including FileBeans), and calls your action and the appropriate method. With Clean URLs you can bind specific urls to specific events within your ActionBean and Magic Happens from there. So, I guess the question is what exactly does Stripes not already do that you want to do? Well, I guess besides security, but that's orthogonal to action handling, and there are a couple of in place mechanisms to even handle that. Perhaps you can be more clear about what you're trying to do. The biggest gap in Stripes ad hoc web services at the moment is having no support for the HTTP verb and conflating the GET and POST verbs to do the same thing. Doesn't affect most people, just annoys RESTy whiners like me. Regards, Will Hartung ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
