Why prefer REST over SOAP?

后端 未结 4 830
终归单人心
终归单人心 2021-02-14 04:15

If I need a web service to pass back and forth a complex object, is there a reason I should prefer SOAP over REST? Here is an example of the possible SOAP message:



        
4条回答
  •  醉酒成梦
    2021-02-14 05:08

    If you develop both the service and the client, using SOAP is as easy as REST (actually easier).

    You may prefer SOAP over REST if these conditions meet:

    • The entire service API is complex, not just one object.

    • The service is used within a relatively small network, and performance is not an important requirement.

    • You decide to spend the minimum amount of time to develop both the service and the API documentation.

提交回复
热议问题