-
1. Re: REST integration within JBoss ESB
burrsutter May 5, 2009 5:22 PM (in response to kconner)In my way of thinking, "REST support" can have at least two different implementations.
a) Great support for HTTP:
- synchronous request/reply
- important verbs (e.g. GET, PUT, POST, DELETE)
- access to the entire URI & query string, ease of access in an action to the URI, in some cases to make routing decisions
- ability to change the content-type of the response
- ability to return declared HTTP response codes
- multiple services per port
- support for reading and setting the HTTP headers in an action
- support for marshalling the response data as XML or JSON, based on the HTTP Accept header
Examples:
GET http://localhost:8080/orders/10 - fetch me order id 10
PUT http://locahost:8080/orders/10 - insert with order id 10
POST http://locahost:8080/orders - insert order, return a
Status 201 Created
Location: http://localhost:8080/orders/1235
GET http://localhost:8080/orders/10/orderlines - fetch me the order line-items from order id 10
b) Inclusion of and support for a JAX-RS implementation like RESTEasy. This could work like the older 181 annotated JAX-WS endpoint with SOAPProcessor action. I'm not sure how to map it to the EBWS feature. -
2. Re: REST integration within JBoss ESB
burrsutter May 5, 2009 6:18 PM (in response to kconner)How about:
- basic-auth
- https
- XSD validation of the inbound request body, outbound response body
- CBR based on partial or whole URIs - where the routed-to service can provide the response
I think the biggest trick is how all the HTTP headers, request content, and response body are mapped to the ESB message and made available in actions. -
3. Re: REST integration within JBoss ESB
clandestino_bgd May 6, 2009 9:16 AM (in response to kconner)Hi,
I think the biggest trick is how all the HTTP headers, request content, and response body are mapped to the ESB message and made available in actions.
+1
In general, it would be nice if esb can support:
- rest service consuming (resteasy client impl is very good)
- rest service exposing (esb service deploy as rest)
Making resteasy the 1st class citizen of esb (with appropriate support from jboss tools) would be great.
Alternatively, maybe you can take a look at enunciate:
http://enunciate.codehaus.org/
best,
milan -
4. Re: REST integration within JBoss ESB
burrsutter May 6, 2009 10:45 AM (in response to kconner)- rest service consuming (resteasy client impl is very good)
In ESB terminology, would this be a variation on the HttpRouter action which can synchronously invoke a remote HTTP endpoint and push the response into the downstream actions of the pipeline? -
5. Re: REST integration within JBoss ESB
burrsutter May 6, 2009 10:51 AM (in response to kconner)- rest service exposing (esb service deploy as rest)
via RESTEasy, what do you think is put into a .java as annotations?
@GET @Path("books")
vs what should be specified in the jboss-esb.xml file to take an ESB Service and expose it in a RESTful way? -
6. Re: REST integration within JBoss ESB
scottdawson May 15, 2009 10:48 AM (in response to kconner)Burr mentioned
important verbs (e.g. GET, PUT, POST, DELETE)
One thing I think should get a high priority is the addition of support for PUT and DELETE in the HttpRouter. It's currently possible to respond to all four verbs with the JBR listener and it's possible to send GETs and POSTs with the HttpRouter. So the two missing operations are the outbound PUT and DELETE.
Thanks,
Scott -
7. Re: REST integration within JBoss ESB
jackalista Jul 13, 2010 5:19 PM (in response to burrsutter)Hi, I'm s newbie interested in this subject, has there been any progress along these lines? I was personally looking for both a Router and something akin to SOAPCLient, like RESTClient as an action, does such a thing (under any name) exist? Thanks.
--j
-
8. Re: REST integration within JBoss ESB
_es Nov 15, 2010 6:32 AM (in response to kconner)Any news on this topic? Will there be some support to example configure http-gateway to have own action implementations for different HTTP-methods?
-
9. Re: REST integration within JBoss ESB
jackalista Nov 15, 2010 10:24 AM (in response to _es)Hey Esa. No. not to my knowledge, but I made a rest client out of the jersey HTTP client which worked, you can get a bare bones bit of starter code here: https://community.jboss.org/thread/152018?start=15&tstart=0
If you read that thread and grab the zip file (on the 2nd page) to get the code you should be able to make your own client / gateway / etc. Good luck!
-=j=-
-
10. Re: REST integration within JBoss ESB
_es Nov 16, 2010 1:23 AM (in response to kconner)Thanks a lot Jack! I will take a look in to that.
It would be also nice to hear from JBoss guys if there's been any actions after that requirements phase over year ago. It seems that other JBOSS things are going RESTful way like example HornetQ offering REST interface.
-
11. Re: REST integration within JBoss ESB
jackalista Nov 16, 2010 12:57 PM (in response to _es)We had a quick chat with some of their folks and while RESTful stuff isn't on the *schedule*, meaning it's not slated for immediate action, they do have it in their sites. I think if more people were to bother them about it, we might be able to move it up in priority. Just a thought...
-
12. Re: REST integration within JBoss ESB
_es Nov 17, 2010 3:51 AM (in response to kconner)Unfortunate that example of yours Jack was not what I was looking for. What I am looking for is a HTTP Gateway variant which is able to route the incoming HTTP Requests to correct ActionLifecycle implemenation based on the http method in request. So I was hoping that there would be some solution, example similar to RESTEasy, coming to SOA Platform in the future. I know I can use current HTTP Gateway offered by SOA Platform and implement REST kind of functionality to ActionLifecycle level to take care of routing, but I was hoping there would be some out of the box solution in SOA plaftorm, atleast coming in near future.