Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why/How SOAP is Stateful?

I don't have any reference to give here to show my research (because none of the links are to the point) and even Google doesn't have an exact answer. Everyone says web service is stateful but that's confusing. By principle, I believe, SOAP is stateful and REST is stateless. So, Why/How SOAP is stateful ?

like image 204
kSO Avatar asked Apr 22 '16 07:04

kSO


People also ask

Why is SOAP not stateless?

#4) SOAP is state-full (not stateless) as it takes the entire request as a whole, unlike REST which provides independent processing of different methods. No independent processing is there in SOAP.

Are SOAP and REST stateful?

Finally, SOAP has built-in stateful operations. REST is naturally stateless, but SOAP is designed to support conversational state management.

Is SOAP stateless or stateful if stateless how can you make it a stateful?

This mean, soap provide mechanism to pass data between client and server. By design and main purpose SOAP is data protocl to be use between server and clients. Server(service) save, preserve and response data. Soap as data can be used in both variants in service - stateful or stateless.

Why is REST stateful?

Q. Is REST API stateless or stateful? A. REST APIs are stateless because, rather than relying on the server remembering previous requests, REST applications require each request to contain all of the information necessary for the server to understand it.


1 Answers

Basically Stateful means that server stores information about the client and uses that information over a series of requests. So performing one request is dependant upon the state of some other request (e.g. previous). Implementing this is possible with http protocols.

So you can have stateful or stateless SOAP - it's only a matter of how you design it.

Also please note that comparing SOAP and REST is not really correct. The first one is basically Protocol (or at least it's trying to be) and REST is just a architecture pattern/style.

I know this is not exactly answering your question but please take a look at this link: SOAP vs REST (differences) It's extremely well written and can help you understand those technologies a bit better.

like image 171
Wazniak Avatar answered Oct 08 '22 20:10

Wazniak