Srinath Perera wrote:
Hi Eran;

If we use two servlets .. user need to aware about the endpoint change..
  
Making users aware abt it explicitly is good, IMO.
When I did what we have before .. I actually think about the two
servlets. But one servlet is kind of cool for me as once you rest
enable it .. all the services will have REST and normal interfaces.

Does a one servlets complecate/ slowdown the things too much?
  
It will not slow down, but complicates the stuff. REST is rich enough to be implemented in a seperate servlet. When you were implementing, u've implemented just one case, out 5 or more scenarios. Just look at even the current code, its getting complicated.

So I still thinks its kind of cool and easy to have them in two seperate serlvets.

Chinthaka
Srinath

On 11/26/05, Davanum Srinivas <[EMAIL PROTECTED]> wrote:
  
+1 from me. But internally are there too much differences between the
2 servlets?



On 11/26/05, Eran Chinthaka <[EMAIL PROTECTED]> wrote:
    
 Hi Devs,

 It has been some time that we wanted to implement REST support for Axis2.
For some reason this got delayed. But I think we are moving towards 1.0, its
better to do that.
 I myself with Thilini volunteer to do that, of course with your help.
 We will be adhering to the rules found in WSDL 2.0 for REST support. But
this does not mean that for a service to be invoked as REST, it MUST contain
a WSDL 2.0 compatible WSDL file. And please do remember that we are not
going to make Axis2 a REST engine, but we are going to support REST.
 Thilini has implemented this in the sending part, within the
CommonsHTTPTransport sender. And I thought of implementing that in the
receiving side.

 Let me explain a bit on these.

 Sending Side : Client can, via call api or config files, will enable a
particular invocation as REST invocation. Client will provide with the HTTP
method that should be used and the content type. Depending on those
parameters (of course with some defaults, if user does not give all of
them), we send the message to the server. So user can either send message as
a GET request or a POST request, removing the barrier we had earlier in
Axis2 that we MUST use GET for REST style interactions.
 We will further improve the existing code by supporting the binding rules
in WSSL. Meaning, if you use POST, you can send some params in the URL and
some parts in the body. So we have to read the WSDL to find the correct
rules. This part is yet to be done.

 Server Side :
 When a message is received either using GET or POST method, if its not a
SOAP request we will try to see whether that request adhere to the REST
rules found in WSDL 2.0. Since params can come in the URL in any order, we
need to create the proper SOAP envelope, using the schema for the message,
before handing that over to the AxisEngine.


 I would like to make a suggestion also with this. In the current system we
use the same servlet to receive both REST and SOAP requests, I propose to
have two servlets (lets implement this for servlets only for the time
being). One to receive SOAP message and the other for REST messages. This is
sort of a clean approach.
 For example user will invloke the "foo" method in the "bar" service like
this.

 using SOAP : http://ip:port/axis2/services/bar/foo/*
 using REST  : htto://ip:port/axis2/rest/bar/foo/*

 Thoughts and Comments ???

 Chinthaka



      
--
Davanum Srinivas : http://wso2.com/blogs/

    

  

Reply via email to