axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "keith chapman" <>
Subject Re: [axis2] How to Configure/Enable Axis2 for REST
Date Tue, 06 Mar 2007 17:08:03 GMT
On 3/6/07, Glen Daniels <> wrote:
> Hi Anne, all:
> Anne Thomas Manes wrote:
> > The reason why the getVersion service works as a RESTful service is
> > that it only supports the GET operation. If you really want to support
> > REST then you need to put constraints on the types of resources and
> > the available methods that can be exposed via a REST interface.
> >
> > If you're tunneling an operation name via the interface, then it isn't
> > REST. It's POX.
> >
> > (Ignore me if you want, but I just had to say it.)
> +1.  I think the work that's been done is great in its own way, but a
> lot more thought needs to go into making this right - and "right" in
> this case does not mean exposing every method on a service via POX
> (although that can have its place too).
> As a start, we should be able to configure any method on a service as
> the "GET" method - as Chinthaka noted, if there is only one method it
> can default to that, and if there are more you should be able to choose
> one.  In general this points to a way to link up HTTP operations with
> particular WS methods - i.e. we can do the same with PUT, DELETE, etc.
> I think the interesting next step will be resource-enabling data that
> lives behind a WS interface, and there's a potentially valuable niche
> here.  Imagine I have an employee management service, which lets me walk
> the organizational hierarchy of my company...
> EmployeeService {
>     Employee [] getEmployees();
>     Employee getEmployee(String name);
>     void addEmployee(Employee employee);
> }
> Employee {
>     String getName();
>     Employee getManager();
> }
> What I want is to be able to map GET on http://server/employees to the
> getEmployees() operation, and return a chunk of XML with links in it:
> <employees>
>   <employee uri="http://server/employees/Fred"/>
>   <employee uri="http://server/employees/Wilma"/>
> </employees>
> Then if I do a GET on Fred's URI, I'd get something like:
> <employee>
>   <name>Fred</name>
>   <manager uri="http://server/employees/MrSlate"/>
> </employee>
> That means mapping the "/Fred" suffix somehow to call
> getEmployee("Fred")...

Hi Glen,

With axis2 supporting WSDL 2.0 this can be done with ease  through the
HTTPBinding (As you will know). May be it would be  even more valuable if we
could expose setting these properties  as annotations (httpLocation and

and then maybe allowing PUTs or POSTs to the
> Fred-specific URI in order to edit data about an employee.  There are of
> course other ways to do this as well, this is just an example.
> This kind of thing, as I understand it, would be more heading towards
> RESTful services.  It's the mapping that's tricky, which is why efforts
> like the recent RESTful Java JSR submission have been starting up...
> --Glen
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.

View raw message