You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by David Purcell <Da...@csu.mnscu.edu> on 2008/01/10 18:15:43 UTC

question about REST services

In looking through the synapse examples, there is mention of POX and a little about REST, but I don't see true support for RESTful style services that take advantage of all the HTTP verbs, for instance.  Is that pretty much the case, or am I missing something?  I'm thinking of the following scenarios:

1.  We could expose a SOAP interface to the world, but the mediation would translate to RESTful style if the end service is actually a RESTful service

2.  Synapse could simply perform some mediation but pass along a REST request to a REST end service (maybe the message/payload doesn't need to be changed, we just need to interrogate the request for security or auditing purposes).

Thoughts?

Thanks,

David

===============================
David Purcell
Systems Architect
MN State Colleges and Universities
david.purcell@csu.mnscu.edu
==============================+



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


Re: question about REST services

Posted by Paul Fremantle <pz...@gmail.com>.
David

We support POST and GET but not PUT, DELETE. We have a JIRA about this
(adding fuller support for HTTP).
I think if we could lay out some patterns for mapping REST calls into
non-REST (or vice versa) then that would probably help us prioritize
adding PUT/DELETE support into the HTTP transport. For example, how
should we represent those as messages in Synapse?

Actually I think it would be pretty easy to do that by adding some
message context - we could even just add a simple property
(HTTPVerb?). Then a content-based filter (<switch>) could work off
each of the Verbs to do something useful.

Thoughts?

Paul

On Jan 10, 2008 5:15 PM, David Purcell <Da...@csu.mnscu.edu> wrote:
> In looking through the synapse examples, there is mention of POX and a little about REST, but I don't see true support for RESTful style services that take advantage of all the HTTP verbs, for instance.  Is that pretty much the case, or am I missing something?  I'm thinking of the following scenarios:
>
> 1.  We could expose a SOAP interface to the world, but the mediation would translate to RESTful style if the end service is actually a RESTful service
>
> 2.  Synapse could simply perform some mediation but pass along a REST request to a REST end service (maybe the message/payload doesn't need to be changed, we just need to interrogate the request for security or auditing purposes).
>
> Thoughts?
>
> Thanks,
>
> David
>
> ===============================
> David Purcell
> Systems Architect
> MN State Colleges and Universities
> david.purcell@csu.mnscu.edu
> ==============================+
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


Re: question about REST services

Posted by Ruwan Linton <ru...@gmail.com>.
Hi David,

Thanks for the valuable feedback and first of all I must agree that still
there are certain areas that we have to improve on when it comes to REST.

At the same time I would like to comment on the two cases that you have
pointed, please see the comments in line...

On Jan 10, 2008 10:45 PM, David Purcell <Da...@csu.mnscu.edu> wrote:

> In looking through the synapse examples, there is mention of POX and a
> little about REST, but I don't see true support for RESTful style services
> that take advantage of all the HTTP verbs, for instance.  Is that pretty
> much the case, or am I missing something?  I'm thinking of the following
> scenarios:
>
> 1.  We could expose a SOAP interface to the world, but the mediation would
> translate to RESTful style if the end service is actually a RESTful service


Well, this is possible but is not automatic, we have to command synapse that
you need to forward this SOAP message to a REST endpoint so that it will
handle it. Other than that by just specifying the endpoint synapse can not
deliver a REST message to that endpoint. AFAIK, this is normal and synapse
can not be too much intelligent and even if we take the SOAP to POX
conversion case it is the same. (In effect we can do this by forcing GET on
the endpoint declaration for the REST case and forcing POX on the endpoint
declaration for the POX case)


>
> 2.  Synapse could simply perform some mediation but pass along a REST
> request to a REST end service (maybe the message/payload doesn't need to be
> changed, we just need to interrogate the request for security or auditing
> purposes).


Hhhmmm.... Good point. Again AFAIK, inside synapse we convert the REST
message to a SOAP info set for the mediation, I think we could improve this
to pass this as it is if there is no mediation involved. Further if the
incoming request is REST then the out going message is also going to be REST
without any forcing (synapse can handle that), but the message will be built
to a SOAP info set and will be converted to the URL format on sending it
out.

Thanks,
Ruwan


>
>
> Thoughts?
>
> Thanks,
>
> David
>
> ===============================
> David Purcell
> Systems Architect
> MN State Colleges and Universities
> david.purcell@csu.mnscu.edu
> ==============================+
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-user-help@ws.apache.org
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"