It's not a secret anymore!*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes A RESTful service has to use HTTP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "A RESTful service has to use HTTP" Watch "A RESTful service has to use HTTP" New topic
Author

A RESTful service has to use HTTP

Ralf Muehle
Greenhorn

Joined: Apr 05, 2014
Posts: 3
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
Marshal

Joined: Mar 22, 2005
Posts: 41106
    
  45
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.


Ping & DNS - my free Android networking tools app
Frits Walraven
Creator of Enthuware JWS+ V6
Bartender

Joined: Apr 07, 2010
Posts: 1632
    
  23

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

Joined: Feb 29, 2008
Posts: 1076
    
    1

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
Marshal

Joined: Mar 22, 2005
Posts: 41106
    
  45
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

Joined: Apr 05, 2014
Posts: 3
many thanks for the explanations
Abhay Agarwal
Ranch Hand

Joined: Feb 29, 2008
Posts: 1076
    
    1

thanks for the correction
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A RESTful service has to use HTTP
 
Similar Threads
restful webservices
Creating a webservice using XML over HTTP.
book about web service for beginners
singleton with lazy initialization
Question on other WS binding and JAX-RS