You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Xinjun Chen <xj...@gmail.com> on 2006/08/31 11:30:57 UTC
[Axis2] Motivation of RESTful web services support
Hi,
I read through the Axis2 documentation about RESTful support from
http://ws.apache.org/axis2/1_0/rest-ws.html.
I have some questions here.
1. What's the motivation of RESTful web services support in Axis2? If
the efficiency the main motivation of REST spport?
2. If the client send a request in a RESTful way, will there be no
SOAP headers on the wire? Does this improve efficiency?
3. Since there is no SOAP headers, does it mean some features like
WS-Addressing support, WS-Security, and implementations of other Web
services specifications which depends on SOAP headers will be
automatically disabled? Will REST be really useful in business and
industry without security? Without the WS-Addressing, can we still
have another way to build and invoke stateful web services?
4. Why there is separation of SOAP web services and REST web services?
>From the explanation in the link, it seems that even if the client
invoke the web services in a RESTful way, at the server side, the
Axis2 engine still needs to construct SOAP Envelope, and then send the
message to the end web service. In this way, how does the client
invoke the web service should be transparent to the end web services.
And thus there should be no classification of SOAP web services or
REST web services. In stead, these two are only two invocation styles.
Is my understanding correct?
5. What's the real usage of REST style?
Regards,
Xinjun
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Hi Anne,
> POX doesn't imply just supporting POST. POX simply means that you are
> formatting the payload as plain XML, without a separate envelope.
Agreed but POX folks usually ignore GET, which is silly .. or they have
a separate vision for how to process GET. In Axis2 we're *very* clear
about how we think about it: its the way WSDL 2.0 thinks about it. Since
I've been a part of both I'm of course of the mindset WSDL 2.0 got that
bit right too ;-).
> If
> you need to pass additional system-levle information, that should be
> specified in the HTTP header or the MIME header.
Of course if you can't live within the standard HTTP header set and the
standard MIME type system then you have to get industry consensus on
those extensions to get interoperability. Remember HTTPR?
If the basic HTTP structures suffice then POX is a great thing. If you
need to intro headers to say what the signature is for example then I
don't see why that buys *any* value over SOAP .. which is basically a
standardized bag for putting any kind of extension like that in a
well-known place.
> Sometimes POX is
> RESTful, and sometimes it isn't. That's an issue of design, not
> protocols.
+1.
> Note that a lot of folks that are campaigning against WS-* for its
> complexity (e.g., Tim Bray) are not proposing REST as an alternative
> -- just POX.
Of course. But its also important to understand that these are not all
purely technically motivated arguments .. *if* the problem space sits
within what's solved by HTTP and HTTPS then POX is great (and is what
MUST be used .. because of the incredible interop that implies).
> > Now you've drunk too much REST coolaid Anne ;-) .. MIME is not self
> > describing when it comes to XML .. saying application/xml simply isn't
> > enough to "describe" the XML; you do need a schema of some sort.
>
> Ah ... but you don't have to use application/xml. You can define your
> own MIME type to type the specific document. And you don't have to
> register a MIME type in order to use it.
Yes you can .. application/x-foo or x-foo/y-bar. However, you need to
get the other side to understand and accept those too .. and of course
welcome to a new (ugly) standards battle.
Mark Baker and the other RESTafarians don't advocate this approach
because its not interoperable.
(BTW are you on the public-web-http-desc@w3.org list? New battleground,
same battle .. why WSDL sucks and why you need a new thing, which of
course must be kept secret because otherwise someone will use it and get
coupled. &^$%#W$%^&^%$@$.)
Sanjiva.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Mon, 2006-09-04 at 13:30 +0800, Xinjun Chen wrote:
> It is very exciting to see you expert with different ideas discussing
> the issues here :-).
>
> I have some misconception about REST. I had thought only POST can be
> used if there are some parameter info to transmit. In fact, I am still
> not quite sure how to transmit parameter info if GET is used. Say, if
> "void operationA(ComplexTypeA complexVar)" is the signature, how can I
> pass in the complexTypeA info if using GET?
In theory you can do anything in a URI .. its like an infinitely long
Turing tape ;-). So in theory you can take *any* data and URI encode it
and stick it as a parameter (or a path component) of a GET.
However, in practice there's a 4k limit and no one in their right mind
would even test that. So often people off GET bindings for stuff that
has simple data coming in ... and that's what the WSDL 2.0 spec also
supports very elegantly (you should look at it as that'll explain the
Axis2 design point).
> I am not sure whether I am asking the correct question. Am I trying to
> understand REST using a service-oriented view when asking this
> question?
IMO Yes; if you're using REST you use GET if the act of getting a
representation of the resource is "safe"; i.e., side-effect free. How
you identify the resource (with a complex path, with query params) is
not relevant in theory.
Another thing to understand is the SOAP 1.2 SOAP Response MEP - that
basically defines a mapping for an HTTP GET to SOAP response pattern.
Again that too is nicely supported by Axis2.
So the real thing with REST is not how you can stuff a bunch of stuff
into a URI .. rather about what your resources are and whether you can
map all the interactions to the actions of GETting representation of the
resource, PUTting a representation of the resource, POSTing some data to
a resource, and DELETEing a resource. Of course GETting a representation
of the resource shouldn't "change" the resource.
Sanjiva.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Xinjun Chen <xj...@gmail.com>.
It is very exciting to see you expert with different ideas discussing
the issues here :-).
I have some misconception about REST. I had thought only POST can be
used if there are some parameter info to transmit. In fact, I am still
not quite sure how to transmit parameter info if GET is used. Say, if
"void operationA(ComplexTypeA complexVar)" is the signature, how can I
pass in the complexTypeA info if using GET?
I am not sure whether I am asking the correct question. Am I trying to
understand REST using a service-oriented view when asking this
question?
Regards,
Xinjun
On 9/3/06, Anne Thomas Manes <at...@gmail.com> wrote:
> Hi Sanjiva,
>
> On 9/2/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> > Hi Anne,
> >
> > > Good questions. The way I see it, support for REST has more to do with
> > > hype than anything else -- especially the way it's been implemented.
> > > (which really is POX rather than REST)
> >
> > As I said in my reply, in Axis2 we do support more than POX- we also
> > support GETs. But in principle I agree with your comment .. REST is full
> > of hype these days. In Axis2 we *do not* do full REST (with etag support
> > and all .. although I am working with Ruwan Linton on a caching module
> > that will support it).
>
> POX doesn't imply just supporting POST. POX simply means that you are
> formatting the payload as plain XML, without a separate envelope. If
> you need to pass additional system-levle information, that should be
> specified in the HTTP header or the MIME header. Sometimes POX is
> RESTful, and sometimes it isn't. That's an issue of design, not
> protocols.
>
> Note that a lot of folks that are campaigning against WS-* for its
> complexity (e.g., Tim Bray) are not proposing REST as an alternative
> -- just POX.
>
> > > There is a growing backlash against the complexity of SOAP and WS-*,
> > > and in response, people are looking for a simpler, more native-Web
> > > approach to services. And that's POX -- Plain Old XML over HTTP. HTTP
> > > is a very powerful and scalable application protocol. It supports
> > > clean separation of header and application payload. It provides a
> > > means to support self-describing messages (using MIME types). It
> >
> > Now you've drunk too much REST coolaid Anne ;-) .. MIME is not self
> > describing when it comes to XML .. saying application/xml simply isn't
> > enough to "describe" the XML; you do need a schema of some sort.
>
> Ah ... but you don't have to use application/xml. You can define your
> own MIME type to type the specific document. And you don't have to
> register a MIME type in order to use it.
>
> > > supports security (HTTPS) and stateful sessions (cookies). Many argue
> > > that the SOAP envelope and all the SOAP Headers are just a lot of
> > > extra clutter. And for many applications, that's true. POX is
> > > absolutely adequate.
> >
> > +1.
> >
> > > But POX does not automatically imply REST. REST is an architectural
> > > style -- one that is resource-oriented rather the service-oriented. If
> > > you think that you can take a service-oriented application and
> > > generate a resource-oriented interface for it, then you really don't
> > > understand REST. If you want a RESTful system, it requires a different
> > > design model -- the two architectural styles (service vs
> > > resource-oriented) are fundamentally different.
> >
> > Big +1.
> >
> > > Let me explain using Mark Baker's favorite example -- lightbulbs.
> > > Let's say you want to design a system that allows you to turn
> > > lightbulbs on and off.
> >
> > And just to make sure people understand- when this example was discussed
> > in http://groups.yahoo.com/group/service-orientated-architecture/, there
> > was a thread of like 100 messages that got quite a diversity of
> > opinions. Moral of the story: achieving REST style architectures
> > properly is just as much of an art as achieving SOA properly.
> >
> > Sanjiva.
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Anne Thomas Manes <at...@gmail.com>.
Hi Sanjiva,
On 9/2/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> Hi Anne,
>
> > Good questions. The way I see it, support for REST has more to do with
> > hype than anything else -- especially the way it's been implemented.
> > (which really is POX rather than REST)
>
> As I said in my reply, in Axis2 we do support more than POX- we also
> support GETs. But in principle I agree with your comment .. REST is full
> of hype these days. In Axis2 we *do not* do full REST (with etag support
> and all .. although I am working with Ruwan Linton on a caching module
> that will support it).
POX doesn't imply just supporting POST. POX simply means that you are
formatting the payload as plain XML, without a separate envelope. If
you need to pass additional system-levle information, that should be
specified in the HTTP header or the MIME header. Sometimes POX is
RESTful, and sometimes it isn't. That's an issue of design, not
protocols.
Note that a lot of folks that are campaigning against WS-* for its
complexity (e.g., Tim Bray) are not proposing REST as an alternative
-- just POX.
> > There is a growing backlash against the complexity of SOAP and WS-*,
> > and in response, people are looking for a simpler, more native-Web
> > approach to services. And that's POX -- Plain Old XML over HTTP. HTTP
> > is a very powerful and scalable application protocol. It supports
> > clean separation of header and application payload. It provides a
> > means to support self-describing messages (using MIME types). It
>
> Now you've drunk too much REST coolaid Anne ;-) .. MIME is not self
> describing when it comes to XML .. saying application/xml simply isn't
> enough to "describe" the XML; you do need a schema of some sort.
Ah ... but you don't have to use application/xml. You can define your
own MIME type to type the specific document. And you don't have to
register a MIME type in order to use it.
> > supports security (HTTPS) and stateful sessions (cookies). Many argue
> > that the SOAP envelope and all the SOAP Headers are just a lot of
> > extra clutter. And for many applications, that's true. POX is
> > absolutely adequate.
>
> +1.
>
> > But POX does not automatically imply REST. REST is an architectural
> > style -- one that is resource-oriented rather the service-oriented. If
> > you think that you can take a service-oriented application and
> > generate a resource-oriented interface for it, then you really don't
> > understand REST. If you want a RESTful system, it requires a different
> > design model -- the two architectural styles (service vs
> > resource-oriented) are fundamentally different.
>
> Big +1.
>
> > Let me explain using Mark Baker's favorite example -- lightbulbs.
> > Let's say you want to design a system that allows you to turn
> > lightbulbs on and off.
>
> And just to make sure people understand- when this example was discussed
> in http://groups.yahoo.com/group/service-orientated-architecture/, there
> was a thread of like 100 messages that got quite a diversity of
> opinions. Moral of the story: achieving REST style architectures
> properly is just as much of an art as achieving SOA properly.
>
> Sanjiva.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
Hi Anne,
> Good questions. The way I see it, support for REST has more to do with
> hype than anything else -- especially the way it's been implemented.
> (which really is POX rather than REST)
As I said in my reply, in Axis2 we do support more than POX- we also
support GETs. But in principle I agree with your comment .. REST is full
of hype these days. In Axis2 we *do not* do full REST (with etag support
and all .. although I am working with Ruwan Linton on a caching module
that will support it).
> There is a growing backlash against the complexity of SOAP and WS-*,
> and in response, people are looking for a simpler, more native-Web
> approach to services. And that's POX -- Plain Old XML over HTTP. HTTP
> is a very powerful and scalable application protocol. It supports
> clean separation of header and application payload. It provides a
> means to support self-describing messages (using MIME types). It
Now you've drunk too much REST coolaid Anne ;-) .. MIME is not self
describing when it comes to XML .. saying application/xml simply isn't
enough to "describe" the XML; you do need a schema of some sort.
> supports security (HTTPS) and stateful sessions (cookies). Many argue
> that the SOAP envelope and all the SOAP Headers are just a lot of
> extra clutter. And for many applications, that's true. POX is
> absolutely adequate.
+1.
> But POX does not automatically imply REST. REST is an architectural
> style -- one that is resource-oriented rather the service-oriented. If
> you think that you can take a service-oriented application and
> generate a resource-oriented interface for it, then you really don't
> understand REST. If you want a RESTful system, it requires a different
> design model -- the two architectural styles (service vs
> resource-oriented) are fundamentally different.
Big +1.
> Let me explain using Mark Baker's favorite example -- lightbulbs.
> Let's say you want to design a system that allows you to turn
> lightbulbs on and off.
And just to make sure people understand- when this example was discussed
in http://groups.yahoo.com/group/service-orientated-architecture/, there
was a thread of like 100 messages that got quite a diversity of
opinions. Moral of the story: achieving REST style architectures
properly is just as much of an art as achieving SOA properly.
Sanjiva.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Anne Thomas Manes <at...@gmail.com>.
In a RESTful system, a service has a *uniform* interface. When used in
conjunction with HTTP, the operations are GET, PUT, POST, DELETE, and
the semantics of those operations are defined by the HTTP protocol:
GET: return a representation of the resource
PUT: replace the representation of the resource
POST: add more information to the resource (and perhaps return a new
representation)
DELETE: remove the resource
That does not mean that the signature must be "void
OperationName(void)". In fact, the signatures should look something
like this:
representation resource.Get();
void resource.Put(representation);
newRepresentation resource.Post(resourceInfo);
void resource.Delete();
If you are doing truly RESTful systems, you don't have invocation
parameters -- you simply have resources and resource representations.
Many people use the POST method in HTTP to do unRESTful things -- like
passing in a method request with parameters. That's how CGI works, as
well as SOAP. But that defeats the core principles of REST -- you
don't have custom methods.
Anne
On 9/1/06, Xinjun Chen <xj...@gmail.com> wrote:
> Anne,
>
> Thank you very much!
> I really appreciate your responsive and insightful explanations,
> arguments, and pointers.
> I am also very excited to know the REST debate.
>
> Unique interface is my first impression of REST, like the HTTP
> protocol. Could I ask you another question on REST?
> Is it a must that in RESTful system, the service's operation must have
> a signature "void OperationName(void)"? Then how to transfer
> invocation specific parameters? Does it imply that we must turn to
> HTTP and put those operation parameters in HTTP attributes?
>
>
> Regards,
> Xinjun
>
> On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> > It's not a debate between POX and Axis (specifically) -- it's between
> > POX and SOAP/WS-*. And the REST debate is one between
> > service-orientation versus resource-orientation. Note that REST
> > doesn't preclude the use of SOAP and WS-*. The significant distinction
> > is in the operations exposed by the service. In unRESTful systems, the
> > service exposes a customized set of operations, e.g., getQuote,
> > getCustomerByID, calculateSalesTax, etc. In a RESTful system, the
> > service exposes a generic interface, e.g., Get, Put, Post, Delete.
> > Passing in a method name with a set of parameters is unRESTful.
> >
> > Here's a nice writeup on REST:
> > http://www.xfront.com/REST-Web-Services.html
> >
> > This article summarizes some of the debate about SOAP being too "enterprisey":
> > http://blogs.zdnet.com/service-oriented/?p=614
> >
> > Also, you can Google "SOAP enterprisey" and find more.
> >
> > Anne
> >
> > On 8/31/06, Michael Larkin <ml...@e2e.us> wrote:
> > > Dear Anne,
> > >
> > > I would like to know more about the debate between AXIS and POX supporters
> > > and would be grateful if you would point me in the right direction (without
> > > bringing the debate into this forum).
> > >
> > > You said: "There is a growing backlash against the complexity of SOAP and
> > > WS-*, and in response, people are looking for a simpler, more native-Web
> > > approach to services. And that's POX -- Plain Old XML over HTTP. HTTP is a
> > > very powerful and scalable application protocol. It supports clean
> > > separation of header and application payload. It provides a means to support
> > > self-describing messages (using MIME types). It supports security (HTTPS)
> > > and stateful sessions (cookies). Many argue that the SOAP envelope and all
> > > the SOAP Headers are just a lot of extra clutter. And for many applications,
> > > that's true. POX is absolutely adequate."
> > >
> > > Thanks!
> > >
> > > Regards,
> > >
> > > Michael
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Xinjun Chen <xj...@gmail.com>.
Anne,
Thank you very much!
I really appreciate your responsive and insightful explanations,
arguments, and pointers.
I am also very excited to know the REST debate.
Unique interface is my first impression of REST, like the HTTP
protocol. Could I ask you another question on REST?
Is it a must that in RESTful system, the service's operation must have
a signature "void OperationName(void)"? Then how to transfer
invocation specific parameters? Does it imply that we must turn to
HTTP and put those operation parameters in HTTP attributes?
Regards,
Xinjun
On 9/1/06, Anne Thomas Manes <at...@gmail.com> wrote:
> It's not a debate between POX and Axis (specifically) -- it's between
> POX and SOAP/WS-*. And the REST debate is one between
> service-orientation versus resource-orientation. Note that REST
> doesn't preclude the use of SOAP and WS-*. The significant distinction
> is in the operations exposed by the service. In unRESTful systems, the
> service exposes a customized set of operations, e.g., getQuote,
> getCustomerByID, calculateSalesTax, etc. In a RESTful system, the
> service exposes a generic interface, e.g., Get, Put, Post, Delete.
> Passing in a method name with a set of parameters is unRESTful.
>
> Here's a nice writeup on REST:
> http://www.xfront.com/REST-Web-Services.html
>
> This article summarizes some of the debate about SOAP being too "enterprisey":
> http://blogs.zdnet.com/service-oriented/?p=614
>
> Also, you can Google "SOAP enterprisey" and find more.
>
> Anne
>
> On 8/31/06, Michael Larkin <ml...@e2e.us> wrote:
> > Dear Anne,
> >
> > I would like to know more about the debate between AXIS and POX supporters
> > and would be grateful if you would point me in the right direction (without
> > bringing the debate into this forum).
> >
> > You said: "There is a growing backlash against the complexity of SOAP and
> > WS-*, and in response, people are looking for a simpler, more native-Web
> > approach to services. And that's POX -- Plain Old XML over HTTP. HTTP is a
> > very powerful and scalable application protocol. It supports clean
> > separation of header and application payload. It provides a means to support
> > self-describing messages (using MIME types). It supports security (HTTPS)
> > and stateful sessions (cookies). Many argue that the SOAP envelope and all
> > the SOAP Headers are just a lot of extra clutter. And for many applications,
> > that's true. POX is absolutely adequate."
> >
> > Thanks!
> >
> > Regards,
> >
> > Michael
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Anne Thomas Manes <at...@gmail.com>.
It's not a debate between POX and Axis (specifically) -- it's between
POX and SOAP/WS-*. And the REST debate is one between
service-orientation versus resource-orientation. Note that REST
doesn't preclude the use of SOAP and WS-*. The significant distinction
is in the operations exposed by the service. In unRESTful systems, the
service exposes a customized set of operations, e.g., getQuote,
getCustomerByID, calculateSalesTax, etc. In a RESTful system, the
service exposes a generic interface, e.g., Get, Put, Post, Delete.
Passing in a method name with a set of parameters is unRESTful.
Here's a nice writeup on REST:
http://www.xfront.com/REST-Web-Services.html
This article summarizes some of the debate about SOAP being too "enterprisey":
http://blogs.zdnet.com/service-oriented/?p=614
Also, you can Google "SOAP enterprisey" and find more.
Anne
On 8/31/06, Michael Larkin <ml...@e2e.us> wrote:
> Dear Anne,
>
> I would like to know more about the debate between AXIS and POX supporters
> and would be grateful if you would point me in the right direction (without
> bringing the debate into this forum).
>
> You said: "There is a growing backlash against the complexity of SOAP and
> WS-*, and in response, people are looking for a simpler, more native-Web
> approach to services. And that's POX -- Plain Old XML over HTTP. HTTP is a
> very powerful and scalable application protocol. It supports clean
> separation of header and application payload. It provides a means to support
> self-describing messages (using MIME types). It supports security (HTTPS)
> and stateful sessions (cookies). Many argue that the SOAP envelope and all
> the SOAP Headers are just a lot of extra clutter. And for many applications,
> that's true. POX is absolutely adequate."
>
> Thanks!
>
> Regards,
>
> Michael
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
RE: [Axis2] Motivation of RESTful web services support
Posted by Michael Larkin <ml...@e2e.us>.
Dear Anne,
I would like to know more about the debate between AXIS and POX supporters
and would be grateful if you would point me in the right direction (without
bringing the debate into this forum).
You said: "There is a growing backlash against the complexity of SOAP and
WS-*, and in response, people are looking for a simpler, more native-Web
approach to services. And that's POX -- Plain Old XML over HTTP. HTTP is a
very powerful and scalable application protocol. It supports clean
separation of header and application payload. It provides a means to support
self-describing messages (using MIME types). It supports security (HTTPS)
and stateful sessions (cookies). Many argue that the SOAP envelope and all
the SOAP Headers are just a lot of extra clutter. And for many applications,
that's true. POX is absolutely adequate."
Thanks!
Regards,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Anne Thomas Manes <at...@gmail.com>.
Good questions. The way I see it, support for REST has more to do with
hype than anything else -- especially the way it's been implemented.
(which really is POX rather than REST)
There is a growing backlash against the complexity of SOAP and WS-*,
and in response, people are looking for a simpler, more native-Web
approach to services. And that's POX -- Plain Old XML over HTTP. HTTP
is a very powerful and scalable application protocol. It supports
clean separation of header and application payload. It provides a
means to support self-describing messages (using MIME types). It
supports security (HTTPS) and stateful sessions (cookies). Many argue
that the SOAP envelope and all the SOAP Headers are just a lot of
extra clutter. And for many applications, that's true. POX is
absolutely adequate.
But POX does not automatically imply REST. REST is an architectural
style -- one that is resource-oriented rather the service-oriented. If
you think that you can take a service-oriented application and
generate a resource-oriented interface for it, then you really don't
understand REST. If you want a RESTful system, it requires a different
design model -- the two architectural styles (service vs
resource-oriented) are fundamentally different.
Let me explain using Mark Baker's favorite example -- lightbulbs.
Let's say you want to design a system that allows you to turn
lightbulbs on and off.
When designing a service-oriented systems, your design center is the
service and the set of operations it can perform:
Service: LightbulbManagement
Operation: setState
Input: lightbulbID [int], state [On | Off]
Output: void
Operation: getState
Input: lightbulbID [int]
Output: state [On | Off]
Note that you have a single service, which manages all lightbulbs, and
you tell the service which lightbulb to process. Each operation has a
unique URL.
When designing a RESTful system, your design center is the resource,
and each resource (in this case a lightbulb) has a unique URL, and
each resource is manipulated using a uniform interface (GET, PUT,
POST, DELETE):
Resource: Lightbulb
Operation: GET
Output: state [On | Off]
Operation: PUT
Input: state [On | Off]
As you can see, it requires a significantly different design center.
Anne
On 8/31/06, Xinjun Chen <xj...@gmail.com> wrote:
> Hi,
>
> I read through the Axis2 documentation about RESTful support from
> http://ws.apache.org/axis2/1_0/rest-ws.html.
>
> I have some questions here.
>
> 1. What's the motivation of RESTful web services support in Axis2? If
> the efficiency the main motivation of REST spport?
>
> 2. If the client send a request in a RESTful way, will there be no
> SOAP headers on the wire? Does this improve efficiency?
>
> 3. Since there is no SOAP headers, does it mean some features like
> WS-Addressing support, WS-Security, and implementations of other Web
> services specifications which depends on SOAP headers will be
> automatically disabled? Will REST be really useful in business and
> industry without security? Without the WS-Addressing, can we still
> have another way to build and invoke stateful web services?
>
> 4. Why there is separation of SOAP web services and REST web services?
> From the explanation in the link, it seems that even if the client
> invoke the web services in a RESTful way, at the server side, the
> Axis2 engine still needs to construct SOAP Envelope, and then send the
> message to the end web service. In this way, how does the client
> invoke the web service should be transparent to the end web services.
> And thus there should be no classification of SOAP web services or
> REST web services. In stead, these two are only two invocation styles.
> Is my understanding correct?
>
> 5. What's the real usage of REST style?
>
>
> Regards,
>
> Xinjun
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2] Motivation of RESTful web services support
Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Thu, 2006-08-31 at 17:30 +0800, Xinjun Chen wrote:
> Hi,
>
> I read through the Axis2 documentation about RESTful support from
> http://ws.apache.org/axis2/1_0/rest-ws.html.
>
> I have some questions here.
>
> 1. What's the motivation of RESTful web services support in Axis2? If
> the efficiency the main motivation of REST spport?
The motivation is to support the HTTP binding in WSDL 2.0. What that
allows is for a service to have both SOAP and HTTP bindings- the service
impl deals with processing the service data (represented as an XML
element in WSDL 2.0) and whether the data arrives in a SOAP envelope,
inside an HTTP POST or as an HTTP GET. We support that in the client
side as well in the opposite direction: client sends off some XML and
depending on the binding it goes inside a SOAP envelope, in the body of
an HTTP POST or in the URL.
So we do more than "POX" as Anne described: its POX + also URLs being
used to invoke services.
As Anne said in her replies, not everyone needs all the "enterprisey"
features of SOAP .. what Axis2 allows is for service authors and clients
to just deal with the payload and allow the middleware (Axis2) to deal
with it.
> 2. If the client send a request in a RESTful way, will there be no
> SOAP headers on the wire? Does this improve efficiency?
It does if you consider the payload size. However, efficiency increase
is minimal- a SOAP envelope with no headers is just two wrapper elements
that are wasted over POX.
> 3. Since there is no SOAP headers, does it mean some features like
> WS-Addressing support, WS-Security, and implementations of other Web
> services specifications which depends on SOAP headers will be
> automatically disabled?
Yes.
> Will REST be really useful in business and
> industry without security?
HTTPS and HTTP authentication provides a level of security which is
sufficient for many applications. It is not sufficient for the "Web of
trust" level that is now evolving with certificates and such and it is
not sufficient to support message level security (i.e., HTTP security
ends when the payload is delivered). There are many cases where that
level of security is sufficient but there are many cases where that's
absolutely not sufficient and the full WS-* stack including WS-Security,
WS-Trust, WS-Reliable Messaging etc. is all critically needed.
With Axis2 the service author and service client don't have to directly
deal with any of this stuff- you deal with just the payload and policy
assertions are used to engage additional features like WS-Security.
> Without the WS-Addressing, can we still
> have another way to build and invoke stateful web services?
If you buy the REST religion there is no such thing .. in fact even
cookies violate the REST principles. However, people do use HTTP cookies
for lots and lots of things .. so the same is possible here with REST
style services: you can have sessions which are associated to the
transport via cookies. So you can have "stateful" interactions with
services.
> 4. Why there is separation of SOAP web services and REST web services?
> >From the explanation in the link, it seems that even if the client
> invoke the web services in a RESTful way, at the server side, the
> Axis2 engine still needs to construct SOAP Envelope, and then send the
> message to the end web service. In this way, how does the client
> invoke the web service should be transparent to the end web services.
> And thus there should be no classification of SOAP web services or
> REST web services. In stead, these two are only two invocation styles.
> Is my understanding correct?
Yes that is correct.
> 5. What's the real usage of REST style?
I think Anne answered this question very well. In REST there are no
services, there are just resources. So the world is very different if
you do full REST .. what you do is not even SOA then its something like
a "resource oriented architecture".
In Axis2 what we're trying to do is to allow you to use "native HTTP"
POST and GET to talk to the services. Whether you use it to implement a
REST religion compliant architecture or a SOA religion compliant
architecture is not our concern.
Sanjiva.
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org