• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

A RESTful service has to use HTTP

 
Ralf Muehle
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Coderanch,

In Enthuware Test Studio I've got the following question:
Which of the following statements best describe a RESTful Web Service?
One possible answer is: A RESTful service has to use HTTP
The explaination says that it is not necessarily true.

Can someone explain me, why this is not necessarily true?

I ask some REST-experts and all of them didn't know that

best regards,
Ralf
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

REST as defined by Roy Fielding's PhD thesis did not mandate or require HTTP. That said, I am not aware of any REST library that does not use HTTP, nor have I seen a REST WS that was not based on HTTP.
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2345
90
Android Chrome Eclipse IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ralf,

What Ulf is saying is correct. Fielding did not write a PhD about HTTP, he wrote a dissertation about RESTful services. He leaves the possibility open to implement REST by protocols other than HTTP. Let me quote him: "REST does not restrict communication to a particular protocol".

This is just one of the (trick) questions that make you think and do some research on the ideas behind REST. It is important (for the exam) to know the architectural principles of REST. In real-life though, REST is always HTTP.

By the way: if you have any questions or doubts about a question in the question bank, you can hit the "discuss" button and you will be redirected to the Enthuware forums. You might get a quicker response there.

Regards,
Frits
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to Javaranch !!
this is kind of same as we have in Java Servlets. I have always used HTTP Servlets in my career so far. I have never used FTPServlet or SMTPServlet although java specification do have a way to write such Servlets [for example - extends Generic Servlet and implement required inherited method] .

~ abhay
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have always used HTTP Servlets in my career so far. I have never used FTPServlet or SMTPServlet although java specification do have a way to write such Servlets

Not to derail the topic, but the servlet spec does not enable you to write such servlets. It allows servlet engine implementors to enable this, but none has done so yet. See http://www.coderanch.com/how-to/java/ServletsFaq#otherProtocols for some information on this. The only other protocol made available for servlets is SIP - probably unknown to most web developers :-)
 
Ralf Muehle
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
many thanks for the explanations
 
Abhay Agarwal
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for the correction
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic