Web Service and WCF

Source: Internet
Author: User
Tags hosting managed hosting msmq wsdl

How Web Service Works

Web service, also known as XML Web service WebService, is a lightweight, independent communication technology that can receive requests passed from the Internet or other systems on the intranet. is: Software services provided through SOAP on the web, described using WSDL files, and registered through UDDI. WebService can use XML-based soap to represent data and invoke requests, and to transmit these XML-formatted data through the HTTP protocol.

WebService's greatest advantage is to achieve interoperability between heterogeneous platforms, which is one of the main reasons for using WebService. Any two applications can communicate with each other as long as they can read and write XML.

1, WebService deployment is more convenient

2, WebService of the writing, and ordinary class almost

3, of course, there is a benefit: platform-Independent. C#,java write WS can call each other

4, do the distributed system

XML: (extensible Markup Language) Extensible Markup Language. Temporary data processing for short-term, web-oriented network, is the basis of soap.

Soap: Simple Object access Protocol protocol. is the communication protocol for XML WEB Service. When a user finds your WSDL description document through UDDI, he can invoke one or more of the actions in the Web service that you set up by soap. SOAP is a specification for calling methods in the form of XML documents that can support different underlying interfaces, such as HTTP (S) or SMTP.

WSDL: (Web Services Description Language) A WSDL file is an XML document that describes a set of SOAP messages and how to exchange them. In most cases, it is automatically generated and used by the software.

UDDI (Universal Description, Discovery, and integration) is a new project primarily for Web service providers and users. Before a user can invoke a Web service, it is important to determine which business methods are included in the service, to find the called interface definition, and to prepare the software on the server side, and UDDI is a mechanism to guide the system through the description document to find the appropriate service. UDDI uses the SOAP message mechanism (standard xml/http) to publish, edit, browse, and find registration information. It uses XML format to encapsulate various types of data and send it to the registry or to the registry to return the required data.

Features of WCF

1. Unity

WCF is the integration of technologies such as Asmx,.net remoting,enterprise service,wse,msmq. Because WCF is written entirely by managed code, the application that develops WCF is not much different from developing other. NET applications, and we can still use WCF to create service-oriented applications like creating object-oriented applications.

 2. Interoperability

Because the most basic communication mechanism for WCF is soap, this guarantees interoperability between systems, even if it is running in a different context. This communication can be based on the. NET-to. NET communication.

You can communicate across processes, across machines, and even across platforms, as long as you support standard Web Service, such as a Java EE application server (such as Websphere,weblogic). The application can run under the Windows operating system, or it can run on other operating systems, such as Sun solaris,hp unix,linux and so on.

 3. Safety and trustworthiness

Ws-security,ws-trust and Ws-secureconversation are added to the SOAP message for user authentication, data integrity verification, data privacy and many other security factors.

Added ws-reliablemessaging in the header of soap to allow trustworthy end-to-end communication. In the case of Ws-coordination and Ws-atomictransaction-based information exchanged in SOAP format, two-phase transaction commits (two-phase commit transactions) are supported.

Many of the above Ws-policy are supported in WCF. For messaging, SOAP is the basic Protocol for Web service, which contains the message header (header) and the body of the message (body). In the message header, the address information that Ws-addressing uses to locate the SOAP message is defined, along with the MTOM (message transfer optimization mechanism, MSG transmission optimization mechanism).

 4. Compatibility

WCF takes full account of compatibility with legacy systems. Installing WCF does not affect legacy technologies such as ASMX and. Net Remoting. Even for WCF and ASMX, although both use SOAP, WCF-developed-based applications can still interact directly with ASMX.

What is the difference between WebService and WCF?

WebService : Technically, the WebService specification, also known as the WS-* specification, is neither a framework nor a technology. It has a complete set of standard system standards, but also in the continuous improvement of the update. It uses XML extension markup language to represent data (this is the key to language and platform). Microsoft's Web service implementation is called Asp.netwebservice. It uses the SOAP simple Object Access protocol to implement data interactions between applications in a distributed environment. WSDL to implement a service interface-related description. In addition, webservices can be registered with the UDDI Center for use by its customers. Later, Microsoft did Asp.netwebservice security, performance, data encryption, decryption, managed hosting, and many other extensions, called the WSE series, which is over-product, up to WSE3.0. And then it was the WCF era.

ASP. NET Web Service : Microsoft provides a framework for Web services development, which is part of the asp.netframework, but supports the early-riser WS specification. Like SOAP1.1.

WCF : WCF is a development framework for a distributed application that belongs to a specific technology, or platform. Neither the standard nor the norm.

WCF is, in part, an ASP. NET Web Service, because it supports WebService's industry standards and core protocols, So Asp.netwebservice and WSE can do things that are almost as competent, cross-platform and language is not a problem (the data also supports XML formatting, and provides its own formatter).

But WCF, as Microsoft's main push for a communications component or platform, aims not only to support and integrate WebService, because it is also compatible and has the features of many of Microsoft's earlier technologies.

According to Microsoft's official explanation,WCF(previously known as "Indigo") is a unified framework for building and running service-oriented (serviceoriented) applications using managed code. It enables developers to build a secure, trustworthy, transactional solution across platforms that can be compatible with existing systems. WCF is the integrator of Microsoft's distributed application development, which integrates. NET platform, and all of the technologies related to distributed systems, such as enterprisesevices (COM +). Netremoting, WebService (ASMX), WSE3.0, and MSMQ Message Queuing. In the context of communication (communiation), it can span processes, across machines, across subnets, corporate networks and the Internet; in the host program, you can host asp.net,exe,wpf,windowsforms,ntservice,com+ (Host). The protocols that WCF can support include tcp,http, cross-process and custom, and security mode including saml,kerberos,x509, user/password, custom and many other standards and patterns. That is, under the WCF framework, it is easy to develop a distributed system based on SOA, and Microsoft has included all the technical elements associated with it, mastering WCF as the key to opening the door to SOA.

What is the relationship between WCF and Web services, WCF is able to create services that are compatible with Web services, that is, to create services that can be interconnected with Web services, two of whom cannot be expressed as simple inclusions or equivalent relationships. WCF is a set of frameworks used to create various services . This includes creating a Web service (a service with BasicHttpBinding bindings is a Web service).

WCF can be independent of IIS.
WCF can be configured as BasicHttpBinding to be compatible (or become) WS.
WCF can transmit data based on TCP or Messegequeue.
WCF is more configurable than WS, such as security.
WCF can be stateful and supports transactions.
WCF supports a variety of communication protocols Http/https, TCP/UDP, MSMQ, Named pipes, peers, message accessibility, transaction flow, and so on.
  
WCF can integrate with ASP, share a context (HttpContext).
WCF supports a variety of message transmission formats: Text,binary,mtom,json, and so on.
WCF Security is strong: It supports symmetric security, asymmetric security, message security, transport security, SSL flow security, Windows streaming security, and more.
  
WCF supports multiple session modes: one-way, two-way, request/response.
WCF supports rest.
WCF supports a variety of formatting methods. DataContractSerializer, XmlSerializer, DataContractJsonSerializer and so on.

WCF supports was hosting, Windows service hosting, Self-hosting, IIS hosting, and so on.

WCF supports multiple concurrency modes: singleton, monotonic, session

Web Service and WCF

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.