Learning WebService The second step: Knowledge preparation--soap vs REST (WSDL and WADL differences)

Source: Internet
Author: User
Tags soap wsdl

Original address: Smurfs--silently upstream

Notes:

SOAP and REST are two of the main scenarios for implementing WebService (Web API deployment REST seems to take up half of the total)
    • REST Web Services based on HTTP protocol
    • SOAP Web Services supports multiple transport protocols: HTTP, SMTP, MIME, etc.
Java Development WebService the two most important specifications:
    • JSR-224 (jax-ws: Java API for xml-based Web Services), mainly using the SOAP protocol, using WSDL to describe;
    • JSR-311 (jax-rs: The Java API for RESTful Web Services), using the WADL description;
the difference between REST and SOAP :
    • Rest assigns a unique URI to each resource, sending the request in 4 ways of http:get, POST, PUT, delete visually represent get, create, update, and delete.
    • SOAP only uses the Post method to send requests, identifying the portal of the service with a unique URI. (because SOAP does not assume a lower-level protocol for transmitting data, it must be designed to run on a variety of protocols.) Even if the vast majority of soap is running on HTTP, use the URI to identify the service. The criticism of this design is that the delete operation is also sent using the Post method, whereas the HTTP protocol has a more and more logical Delete method available. )
ruler length short:
Rest Benefits: Rest is simple and intuitive , using the HTTP protocol to the limit.
SOAP: complex requirements devastate ease of use.
In the final analysis, no one is omnipotent.
  • Rest uses WADL to describe the rest interface. WADL is like the rest version of WSDL , where the shadow of soap is everywhere as rest is applied to complex fields.
  • In fact, some Web service providers provide rest APIs that are only the rest of the shell, and the transmitted requests and responses are completely simplified soap.

"No technology can solve all problems once and for all, but it is sufficient to gracefully solve the problem in the field under the predetermined constraints."

The introduction of a new technology has always attracted countless follow-up and flattery, only when the dust settles down to get a fair evaluation. ”

Learning WebService The second step: Knowledge preparation--soap vs REST (WSDL and Wadl differences) (RPM)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.