views:

87

answers:

2

Asked in the interview: What is the difference between http servlet and soap over http? What the advantages and disadvantages of both? In which case would use which?

+1  A: 

You didn't mention your background about the APIs mentioned.

In an interview they probably want to hear that a servlet processes a http-request and responses with a http-response as a soap does. The difference is that a soap request contains xml data (header and payload) which has to be parsed in a different way (usually with a framework like Xfire or Axis among others).

stacker
+3  A: 

I would ask if he / she could repeat the question, because it doesn't make much sense in my view. You could very well create a HTTP Servlet that returns SOAP via HTTP.

I guess you would have to explain first what SOAP is, and what a Servlet is.

Thomas Mueller