See comments inline.

On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:


Hi,

I have some questions regarding implementing a RESTfull service. After
reading a lot of previous RESTish threads I got quite confused.
So I hope someone can help me straightened it out.

If I want to create a RESTful service with Axis2 would it then require
that
the service is implemented as RPC, or can other message receivers be used?


Is it possible to create a RESTful service with Axis2 that can be reached
in the following way:
http://www.boeing.com/rest/aircraft/747
instead of
http://www.boeing.com/rest/MyAircraftServices/getAircraft?model=747


Yes this can be done. REST support in Axis2 was achieved  via the WSDL
2.0<http://www.w3.org/2002/ws/desc/>
HTTPBinding<http://www.w3.org/TR/2007/REC-wsdl20-adjuncts-20070626/#http-binding>(If
you are not familiar with WSDL this might sound a bit strange). The
kind
of question you asked can easily be done by deploying your service via a WSDL
2.0 <http://www.w3.org/2002/ws/desc/> description. Please have a look at the
primer it has some easy to understand examples.

First i actually thought that a RESTful service should implement some sort
of interface with methods corresponding to GET, POST, PUT & DELETE.
But I read in some of the other threads that a RESTful service should only
have one method. Isn't that a problem if you try to accomplice the syntax
that the following articles describes.


Yes you can use all 4 HTTP methods described above, depending on your
requirement. Its all about using the appropriate method (Not that you must
use just one method)

http://www.innoq.com/blog/st/2006/06/30/rest_vs_soap_oh_no_not_again.html
http://www.xfront.com/REST-Web-Services.html

Where the same url has different functionality depending on how it is
called (GET, POST).
GET   /order/{id} Get order details
POST  /order/{id} Add item


the current version of Axis2 does not support this (But it can be included,
I will file a JIRA on this and try to get it into the 1.3 release.)

Please let us know if you need more help (Can even assist you in writing
down the WSDL 2.0 description)

Thanks,
Keith.

Regards
Multi-Support A/S

Torben Riis
--------------------------------------------------------------------
Phone +45 96 600 600, Fax +45 96 600 601
E-mail: [EMAIL PROTECTED]
http://www.multi-support.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Reply via email to