What is Web Server

Source: Internet
Author: User
Tags soap wsdl

What the hell is WebService?

Word:WebService is a remote invocation technique across programming languages and cross-operating system platforms.

WebService platform Technology

Xml+xsd,soap and WSDL are the three major technologies that make up the WebService platform.

Xml+xsd:

WebService transmits data using the HTTP protocol, encapsulating the data in XML format (that is, what method of invoking the remote service object in XML, what parameters are passed, and what the service object returns). XML is the format for representing data in the WebService platform. In addition to being easy to establish and easy to analyze, the main advantage of XML is that it is platform-independent and vendor-independent. Independence is more important than technical superiority: Software vendors do not choose a technology invented by competitors.

XML solves the problem of data representation, but it does not define a set of standard data types, much less how to extend this set of data types. For example, what does shaping number mean? 16-bit, 32-bit, 64-bit? These details are important for interoperability. XML Schema (XSD) is a set of standards specifically designed to address this problem. It defines a standard set of data types and gives a language to extend this set of data types. The WebService platform uses XSD as its data type system. When you construct a Web service in a language such as vb.net or C #, all data types that you use must be converted to an XSD type in order to conform to the WebService standard. The tool you used may have automatically helped you with the conversion, but you will probably have to modify the conversion process to suit your needs.

Soap:

WebService sends requests and receives results through the HTTP protocol, both the requested content and the resulting content are encapsulated in XML format, and some specific HTTP message headers are added to describe the content format of the HTTP message. These specific HTTP message headers and XML content formats are the SOAP protocol. SOAP provides a standard RPC method to invoke a Web Service.

SOAP protocol = HTTP protocol + XML data format

The SOAP protocol defines the format of the SOAP message, the SOAP protocol is based on the HTTP protocol, and SOAP is based on XML and XSD, and XML is the data encoding method of soap. A metaphor: HTTP is the normal highway, XML is the middle of the green barrier and both sides of the fence, soap is the ordinary highway through the belt and the fence has been modified highway.

Wsdl:

Like we go to the store to buy things, first of all, we have to know what is in the store to buy, and then to buy, the way the merchant is to put up advertising posters. WebService also, the WebService client to invoke a WebService service, first of all have to know the address of the service where, and what the method can be called in this service, so, The WebService server is the first to use a WSDL file to explain what services in their home can be called externally, what the service is (what methods are available in the service, what parameters are accepted by the method, what the return value is), which URL address the service's network address is represented by, and how the service is invoked.

WSDL (web Services Description Language) is an XML-based language that describes a WEB service and its functions, parameters, and return values. It is a standard format that can be understood by both the WebService client and server side. Because it is XML-based, WSDL is both machine readable and human readable, which is a great benefit. Some of the latest development tools can generate WSDL documents based on your Web service, import WSDL documents, and generate proxy class code that calls the appropriate webservice.

The WSDL file is saved on the Web server and can be accessed through a URL address. Before the client wants to invoke a WebService service, it needs to know the address of the WSDL file for the service. The WebService service provider can expose its WSDL file address in two ways: 1. Register to a UDDI server for lookup; 2. Directly to the client caller.

WebService development

WebService development can be divided into two aspects of server-side development and client development:

Server-side development: The company's internal system of business methods published into WebService services for remote cooperation units and individuals to call. (Some webservice frameworks make it easy to publish your business objects as WebService services, typical Java WebService frameworks include: AXIS,XFIRE,CXF, Java EE servers often also support publishing webservice services, such as JBoss. )
Client development: Call the WebService service, which most people engage in, for example, call the weather WebService service. (Use tools such as the vendor's Wsdl2java to generate proxy class code for static calls, use vendor-supplied client programming API classes, use a JAX-RPC development package from the Sun Company's early standards, and use the JAX-WS development Package from Sun's latest standards.) Of course, Sun has been acquired by Oracle)

WebService's work invocation principle: For the client, we pass the URL address of the WSDL file to the various WebService client APIs, which create the underlying proxy class, and I can call these proxies to access the WebService service. The proxy class turns the client's method call into a SOAP-formatted request data and sends it through the HTTP protocol, returning the received SOAP data to the return value. For the service side, the essence of all kinds of WebService framework is a large servlet, when the remote call client to it through the HTTP protocol sent over the SOAP format of the request data, it analyzes the data, it will know which Java class to invoke which method, It then finds or creates the object, calls its method, wraps the result of the method back into SOAP-formatted data, and returns it to the client via an HTTP response message.

What is Web Server

Related Article

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.