Why isn't SOAP-based web service RESTful?

后端 未结 7 1375
无人及你
无人及你 2021-01-29 20:54

I understand RESTful is an architecture style, but what exactly makes SOAP-based web service not count for RESTful?

It\'s not clear to me which points below (from Wikipe

相关标签:
7条回答
  • 2021-01-29 21:33

    SOAP follows the RPC pattern. A SOAP API describes a series of methods, along with their parameters and return values, that you can call from your code. There's a marshaling step that converts this into it's network representation.

    REST is never RPC. A REST API describes a series of resources, along with a set of verbs (typically HTTP's GET, POST, PUT, DELETE) that can act on them.

    To answer your question directly: SOAP primarily violates point 6 (it doesn't provide a uniform set of verbs across APIs). It also violates point 2 (the server can maintain state for each client), and as a result point 3 as well (state prevents caching).

    0 讨论(0)
提交回复
热议问题