This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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
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.
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.
Welcome to Javaranch !!
this is kind of same as we have in JavaServlets. 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] .
Joined: Mar 22, 2005
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 :-)