Is RESTful faster than SOAP? and when to use one of them?

后端 未结 8 397
清酒与你
清酒与你 2021-01-02 20:58

Duplicate: This is a duplicate of \"What are the best uses of REST services?\" and many others. Please close it.

In web development:

Should

8条回答
  •  隐瞒了意图╮
    2021-01-02 21:53

    Simple Object Access Protocol (SOAP) standard an XML language defining a message architecture and message formats, is used by Web services it contain a description of the operations. WSDL is an XML-based language for describing Web services and how to access them. will run on SMTP,HTTP,FTP etc. Requires middleware support, well defined mechanisam to define services like WSDL+XSD, WS-Policy SOAP will return XML based data SOAP provide standards for security and reliability

    Representational State Transfer (RESTful) web services. they are second generation Web Services. RESTful web services, communicate via HTTP than SOAP-based services and do not require XML messages or WSDL service-API definitions. for REST no middleware is required only HTTP support is needed.WADL Standard, REST can return XML, plain text, JSON, HTML etc

    t is easier for many types of clients to consume RESTful web services while enabling the server side to evolve and scale. Clients can choose to consume some or all aspects of the service and mash it up with other web-based services.

    REST uses standard HTTP so it is simplerto creating clients, developing APIs 2.REST permits many different data formats like XML, plain text, JSON, HTML where as SOAP only permits XML.
    REST has better performance and scalability.
    Rest and can be cached and SOAP can't 5.Built-in error handling where SOAP has No error handling
    REST is particularly useful PDA and other mobile devices.
    

    REST is services are easy to integrate with existing websites.

    SOAP has set of protocols, which provide standards for security and reliability, among other things, and interoperate with other WS conforming clients and servers. SOAP Web services (such as JAX-WS) are useful in handling asynchronous processing and invocation.

    For Complex API's SOAP will be more usefull.

提交回复
热议问题