Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jersey's JAX-RS can be implemented on a protocol other than HTTP/HTTPS?

 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I read through Jersey's JAX-RS tutorial, I don't see this API can be implemented over any protocol other than HTTP/HTTPS. So, can it be implemented over other protocols?

When Roy Fielding first introduced REST web service in year 2000, it is based on HTTP. But I am not sure nowadays if REST service can be based on any protocol, like SOAP-based web service.

By the way, is there any difference between "RestFul service" and " REST service"?
If we say "implement a service RESTFully" means implementing http methods (create/read/update/delete), cacheable, stateless, not necessarily synchronous nowadays, can be asynchronous. So, we can use JAX-WS's @WebServiceProvider to implement a RESTFul service. JAX-WS can be implemented over SOAP protocol and HTTP protocol. I am not sure if JAX-RS or any other REST framework can be implemented on protocols other than http/https.
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
People intercept JAX-RS traffic using protocol buffers and can redirect the input/output to any transport they wish, just like people do with SOAP over WMQ.
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Theoretically, you could implement REST using other protocols; but practically, it's not done. And I would advise against using JAX-WS to implement RESTful WS - use the best tool for the job, and that's JAX-RS.

is there any difference between "RestFul service" and " REST service"?

No.
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
@Ulf

People use SOAP over MQ or SOAP over JMS all the time. Can you clarify what you mean by "its not done"? http://www.ibm.com/developerworks/library/ws-soapmqjms/

Here is a contrast of Rest vs. Soap : http://searchsoa.techtarget.com/tip/REST-vs-SOAP-How-to-choose-the-best-Web-service
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was talking about REST, which the question was about; let's not derail this topic by talking about SOAP.
 
Himai Minh
Ranch Hand
Posts: 1361
7
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe Ulf refers to Jersey's JAX-RS API that can be implemented on HTTP/HTTPS. But JAX-RS API has not completely implemented on any other protocol yet.
Maybe, it will.

REST is an architectural style and it is not required to be implemented on HTTP, according to this web site :http://www.oracle.com/technetwork/articles/javase/restful-142517.html

The reason why Roger mentions SOAP because we can implement Restful SOAP based web services (eg using @WebServiceProvider, @ServiceMode(value=Service.MODE.MESSAGE), @SOAPBinding(parameterStyle=Wrapped, use=Literal, style=Document and using the GET/DELETE/POST/UPDATE to implement the service)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic