• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

A RESTful service has to use HTTP

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Creator of Enthuware JWS+ V6
Posts: 3411
320
Android Eclipse IDE Chrome
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1376
Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 https://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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for the correction
reply
    Bookmark Topic Watch Topic
  • New Topic