What is WebService?

Source: Internet
Author: User
Tags dotnet soap wsdl

One of the most basic purposes of webservice is to provide the ability to work together on different applications across different platforms.

In fact, WebService is not something mysterious,It's a class that can be called remotely, or a component .。

Why use WebService?

WebService is a new concept, it is not the first proposed by Microsoft, but Microsoft's dotnet strategy to make it the widest use of its potential. Perhaps the root cause of its popularity is not Microsoft, perhaps because of the rapid development of bandwidth and storage, but the dotnet strategy does play a big role in making it available on a broader development platform. The dotnet strategy led Microsoft forward, and Microsoft spent nearly $30 billion on the Dotnet program. Why? Because Microsoft wants its idea, the way not only in the stand-alone software, even on the internet is also the most widely recognized. WebService was first used in sun and other network foresight platform, and is looking forward to the development of the bitter. And the first successful development of WebService is the platform, its philosophy is the most widely spread on the internet, the use of a real service. When Microsoft's dotnet program is about to be implemented, Microsoft is also starting to tap into WebService's potential. Today's web sites can only provide a user interface for browsers, while next-generation programmable Web sites link businesses, applications, services, and devices directly to each other. These programmable Web sites will not just be passive sites, but will be reusable smart Web services. Therefore, we must use WebService to adapt to the future development trend. Sentence: In order to conform to the development of the Times.

what are the advantages and disadvantages of webservice?

In the early WebService development, due to the limitation of bandwidth and storage capacity, it was not paid attention to. With the development of technology, bandwidth and storage has become no problem, any fiber will have 1000M, home computers have 160GB, not to mention the server with the easy on the TB disk array. However, with the rapid development of the Internet, people should feel the network to bring people new surprises, that is, online office. Now the online Office system is more advanced, but there is a common problem-compatibility problems, so communication is very difficult, but WebService makes people communicate more smoothly. For example: Exchanges between the two countries need to be translated, very troublesome, so it is better to unify the two languages. And webservice is such a new concept. The WebService has a short development time, which leads to a problem-safety. Since the XML transfer is all plaintext, it is not surprising that security is a problem, but it is only a matter of doing something on the data being transmitted.
Distributed Applications and Browsers
If you look at the current application development, you will find an absolute tendency: people are beginning to prefer a browser-based thin client application. This is certainly not because thin customers are able to provide a better user interface, but because it avoids the high cost of spending on desktop application publishing. Publishing desktop applications is expensive, in part because of problems with application installation and configuration, and the other half because of communication between customers and servers.
Traditional Windows rich client applications use DCOM to communicate with the server and invoke remote objects. Configuring DCOM to work properly in a large network is a challenging task and a nightmare for many it engineers as well. In fact, many it engineers prefer to tolerate the limitations of the browser's functionality, rather than running a DCOM on the LAN. In my opinion, the result is an application that is easy to publish, but very difficult to develop and extremely limited in user interface. In extreme terms, you spend more money and time, but you develop applications that are weaker from the user's perspective. Don't believe me? Ask your accountant what the idea of the new browser-based accounting software is: The vast majority of business program users want to use a more user-friendly Windows UI.
A perfect solution to the client-server communication problem is to use the HTTP protocol to communicate. This is because any machine running a Web browser is using the HTTP protocol. At the same time, many firewalls are currently configured to allow only HTTP connections.
Many commercial applications also face another problem: interoperability with other programs. If all applications are written in the COM or. NET language and run on the Windows platform, it will be all right. In fact, however, most business data is still stored as non-relational files (VSAM) on large hosts and accessed by mainframe programs written in COBOL. There are also many commercial programs that continue to be written in C + +, Java, Visual Basic, and a variety of other languages. Now, in addition to the simplest programs, all applications need to integrate with and exchange data with applications running on other heterogeneous platforms. Such tasks are usually done by special methods such as file transfer and parsing, Message Queuing, and APIs that are only applicable in certain situations, such as IBM's Advanced Program-to-Program communication (APPC). Previously, there was no application communication standard, which was independent of the platform, the build model, and the programming language. Only through web Service, the client and the server are free to communicate with HTTP, regardless of the platform and programming language of the two programs.

what is a Web Service
We have at least two kinds of answers to this question. On the surface, a Web service is an application that exposes an API that can be called through the web. This means that you can programmatically invoke the application via the Web. We call the application calling this Web service a customer. For example, you want to create a Web service that is useful for returning the current weather conditions. Then you can create an ASP page that accepts the ZIP code as a query string, and then returns a comma-separated string containing the current temperature and weather. To invoke this ASP page, the client needs to send the following HTTP GET request:
http://host.company.com/weather.asp?zipcode=20171

The returned data should look like this:
21, clear

This ASP page should be counted as a Web service. It exposes an API that can be called through the Web because it is based on an HTTP GET request. Of course, there is more to the WEB service.
The following is a more precise explanation of Web services: A Web service is a new platform for building interoperable, distributed applications. As a Windows programmer, you may have built a component-based distributed application with COM or DCOM. COM is a very good component technology, but we can easily cite the case that COM does not meet the requirements.
The Web service platform is a set of standards that defines how applications can interoperate on the web. You can write Web services on any platform you like, in any language you like, as long as we can query and access them through the Web service standard.

New Platform
The Web service platform requires a set of protocols for the creation of distributed applications. Any platform has its own data representation method and type system. To achieve interoperability, the WEB service platform must provide a standard set of type systems for communicating different types of systems in different platforms, programming languages, and component models. In traditional distributed systems, the interface-based (interface) platform provides methods for describing interfaces, methods, and parameters (such as IDL languages in COM and Cobar). Similarly, the Web service platform must provide a standard for describing Web service, allowing customers to get enough information to invoke the Web service. Finally, we must also have a way to make remote calls to this Web service. This approach is actually a remote procedure call Protocol (RPC). To achieve interoperability, this RPC protocol must also be independent of the platform and programming language. The three techniques that make up the Web service platform are briefly described in the next few sections.

XML and XSD
Extensible Markup Language (XML) is the basic format for representing data in a Web service 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, or 64-bit? These details are important to achieving interoperability. The XML Schema (XSD) developed by the consortium 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 WEB service platform uses XSD as its data type system. When you construct a Web service in a language such as vb.net or C #, all the data types you use must be converted to the XSD type in order to conform to the Web service 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. In the second chapter, we'll go deep into the XSD and learn how to convert a custom data type (such as a class) to an XSD type.

SOAP
When the Web service is built, you or someone else will call it. The Simple Object Access Protocol (SOAP) provides a standard RPC method to invoke a Web service. In fact, soap is a bit of a misnomer here: it means that the following Web service is represented as an object, but that's not necessarily true: you can write your Web service as a series of C functions and still call it using SOAP. The SOAP specification defines the format of the SOAP message and how to use SOAP through the HTTP protocol. Soap is also based on XML and XSD, and XML is the data encoding method of soap. In chapter three we discuss soap and get acquainted with the various elements of SOAP messages.

WSDL
How would you describe to others what your Web service does, and what parameters are available for each function call? You may write a set of documents yourself, and you may even verbally tell people who need to use your Web service. These informal approaches have at least one serious problem: when programmers sit in front of a computer and want to use your Web service, their tools, such as visual Studio, can't help them because they don't know your Web service at all. The solution is to provide a formal description document in a way that the machine can read. The Web Service Description Language (WSDL) is an XML-based language that describes Web service and its functions, parameters, and return values. 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 code that invokes the corresponding Web service.

Excerpt from: http://www.cnblogs.com/Leo_wl/archive/2010/05/20/1740205.html

What is WebService?

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.