The WebServiceBinding and WebServiceBindingLoader classes in the Axis2 binding are WS specific so you'll need to write new ones of those for your REST binding. Your impls should still extend the BindingBuilderExtension and LoaderExtension SPI classes. Also the Axis2BindingBuilder is specific to the WebServiceBinding so you'll need your own version of that.
As to what to do about the service and reference questions now that you're not using WSDL and how to define what operations are exposed, there's been various suggestions in this thread. Probably the easiest approach to get going first while using Axis2s REST support would be by using interface.javawith fixed method names for the REST operations (like what Jean-Sebastien suggested?). Later on once you've made some progress and this thread reaches some conclusions you can work with everyone else here on a more comprehensive solution. ...ant Also, fyi, there's a presentation on Axis2 and REST: http://people.apache.org/%7Esamisa/ApacheCon_EU_2006_REST.ppt On 8/24/06, Sreelatha S <[EMAIL PROTECTED]> wrote:
Hi Ant, As I am still trying to learn about the REST implementation, based of what you have mentioned below I tried to work on the skeleton classes required for the REST binding on Tuscany, by closely following the REST support in Axis 2 and the Axis2Binding classes in Tuscany. I have created RESTServiceServlet class which does something very similar to what the fdoes in Axis2.Which is processing of GET and POST requests. I however, had a few questions: The Axis2Binding extends from the BindingBuilderExtension which is of the type WebServiceBinding, is it appropriate for the RESTBinding class also to extend the BindingBuilderExtension of the type WebServiceBinding? I am asking this as I have the understanding that REST based service is quite different when compared to a WebService. What should we consider as a RESTService and a RESTReference ?In other words how is a RESTService defined and how should we create one, how are its operations exposed, assuming that we are not using a WSDL as in the case of a Webservice. I appreciate any help in furthering my understanding on this. Thanks. ant elder <[EMAIL PROTECTED]> wrote: Axis2 also has some built in REST support, and as we already have an Axis2 binding it would be relatively easy to get a Tuscany REST binding going using Axis2. All that you need to do is change the Tuscany code to use the Axis2 REST servlet instead of the SOAP one, and change the code where we set up the Axis2 config to set some flags to enable the REST support. With a bit of refactoring of the existing Axis2 binding and changing a few things from private to protected you could probably get something going by subclassing the existing Axis2 binding with minimal new code. I think we should make a better, more 'RESTful' binding than this in the long run, but this approach would be an easy first start. ...ant On 8/22/06, Oisin Hurley wrote: > > > REST is a very generic term, and I think it's more like a resource/ > > service > > naming pattern (URL/URI). When we say REST bindings, what are we > > expecting > > as the REST Service ? > > The resource part is really important, but the small interface part is > important too, as are the expected behaviours of the interface: i.e., > GET is idempotent, PUT will replace a resource, POST will perform a > partial update of the state of a resource. > > IMHO the first place we could go is an XML over HTTP binding and some > kind > of 'generic' processing method in the service (see [0] for an example > of what's RESTful with JAX-WS, which might prompt some ideas). > > cheers > --oh > > [0] http://java.sun.com/developer/technicalArticles/WebServices/restful/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------- Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2ยข/min or less.
