WebService Note 1

Source: Internet
Author: User
Web Services is a platform for establishing interoperable distributed applications. As a set of standards, it defines how applications implement interoperability on the web. You can write web services in a proper language on any platform. dynamic search and access can be performed at runtime as long as the Web service standards are met.

The Web Service Platform requires a set of protocols to create distributed applications.
1. To achieve interoperability between platforms, the Web service platform provides a standard type system (XML and XSD ).
Any platform has its Data Representation Method and type system. A standard type system can solve the communication problem between different types of systems in different platforms, programming languages, and component models.
2. Describe WebService.
The prerequisite for correct use of WebService is to know which services the WebService provides and how to use their information.
In traditional distributed systems, interfaces-based platforms provide methods to describe interfaces, methods, and parameters (such as the IDL languages in COM and Cobar ). Therefore, the Web service platform provides a set of standards to describe the WebService, so that the customer can obtain sufficient information for correct use.
3. If you use the services provided by WebService locally, You need to [Remote Procedure Call Protocol (RPC)] to call these services and obtain the services. To remotely call this WebService. To achieve interoperability, this RPC protocol must be independent of the platform and programming language.

The above three technologies are briefly introduced as follows:
XML and XSD
The basic format of data displayed on the web service platform is Extensible Markup Language (XML ). XSD is used as the data type system.
XML solves the problem of data representation. The main advantages of XML: easy to establish, easy to analyze, platform and vendor independence (that is, both platform-independent and vendor-independent, because of competition, software vendors will never choose the technology invented by their competitors. In this way, the independence in reality is far more important than the technical superiority .)
XML Schema (XSD) developed by W3C defines a set of standard data types, and provides a language to extend this set of data types. Solved the problem of describing the types required for calling methods. Various types of Web services can be used to group the complete database in the memory to the customer, which greatly reduces the amount of data loaded on the database server. When constructing a Web service, all data types must be converted to the XSD type to conform to the Web service standard.

WSDL (Web Service Description Language)
The Web service Description Language (WSDL) is an XML-based language, and its syntax is fully compatible with xml. Describes the Web service and its functions, parameters, and return values.
It is a formal description document provided by machines. Because it is based on XML, you can also read it. Some development tools can generate a WSDL document based on the Web service, import the WSDL document, and generate code to call the corresponding Web service.
The most important part of the WSDL file is the type definition part. The xml format is used to describe the format of data exchange. The format of data exchange is defined by the relationship between xml elements and elements.

SOAP (Simple Object Access Protocal, Simple Object Access Protocol)
SOAP provides standard RPC methods to call Web Services. The SOAP specification defines the format of SOAP messages and how to use SOAP over HTTP. SOAP is also based on XML and XSD, and XML is the data encoding method of SOAP.
Here, soap does not necessarily mean that the Web Service is represented as an object. You can write your web service as a series of C functions and still use soap for calling.

A simple example is to visualize the above relationship:
Assume that a store provides the delivery service.
For all External Stores, take-out is described by name, price, raw material type, quality, etc. For all delivery services, you need to know the customer address and contact number, the name, quantity, and date of the goods subscribed by the customer.
A standard type system is similar to this information. All customers can see through this information what you provide to them? These takeaways may come from small restaurants or large hotels. These raw materials may come from China or Italy.
The description of WebService is similar to the menu provided by the external store to the customer. It combines the above elements into a dish, and then attaches the address, phone number, service region, and business time of the External Store. Menus include Chinese, Japanese, French, Italian, and English. In order to face different customers, let them know what dishes they have.
The Remote Procedure Call Protocol (RPC) is similar to the way you can book by phone or online. In short, you don't have to worry about the address of the External Store. At that time, you will receive delicious food. Whether people bring 0 or 2 wheels, or three or four wheels, it is a certain means of transportation, of course, walking, for the time being, it is regarded as a green transport :-)

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.