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 ?


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 (eg 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.

链接地址: http://www.djcxy.com/p/71472.html

上一篇: REST API真的是RESTful吗?

下一篇: SOAP为什么/如何是有状态的?