Trying to simplify the WS infrastructure, I'm playing with JAX-WS for implementing REStful WS. The client side is easy enough, but it seems that the server-side isn't widely explored (or at the least not publicly written about). In particular, I'm looking for a way to have a URL like
automatically routed to a method that's declared to handle the operation "doTheRestThing", and pass the parameters "ulf" and "42" to it. Mapping the operation is the easy part, but how are parameters handled? Does anyone have an example? Is this really as simple as it gets?
I did some playing around with the service end of REST. Rather than mapping the request to a method, I mapped the request to a class - using an XML configuration file. Each class had its own doGet( request, response ) so taking apart the parameters was delegated to the class.
After much wheel-spin with class loaders I got it to where I could add a new class to the configuration without restarting the server thus making the debug cycle much faster.