What is the difference between adding a Web reference and adding a service reference? What's the difference between the add Service References and the add Web References? __web

Source: Internet
Author: User
Tags soap

(1) The function of the Add Web Reference (Add Web Service Reference) provided in VS2005 is mainly to add Web services references.
(2) VS2008 retains the Add Web Reference (Add Web Service Reference) also for version forward compatibility. Many projects are currently based on the. NET Framework 2.0.
(3) VS2008 support for the WCF Service Library on the. NET Framework version 3.0 or 3.5 after the upgrade. Added the Add service Reference (Add Services Reference) feature. Framework3.0 or 3.5 is available.


You said the situation I have done a test, at the same time the Add service Reference, add Web Reference Both the case of the project type is a WEB service program. Includes Web service projects. The normal console type is no add Web Reference.
I carefully contrast the two ways to add the same WebService generated client file Reference.cs, there is a difference.
1. The main add reference has an access to service metadata, deserialization of the local class file process. This structure is basically similar. Contains files such as Wsdl/discovery.
This is also related to the core industry standards of the WCF Service Support Web service. After all, one of the features of WCF is compatibility with Web service features.
2. In different places, the Add Web Reference generates a Reference.cs file containing a service proxy class that communicates with the Web service, inherits a SOAP class, uses a SOAP protocol, a SOAP simple Object access Protocol, and is based on an XML language. It also includes methods defined in Web service classes, and asynchronous invocation methods and events associated with them. Follow the primary rules for the. NET Web Service.
3.ADD Service Reference generated client file Reference.cs. I looked, and this would also deserialize a local proxy class, very similar to the former. However, in addition to the service class and its related to some other class and contract interface. One of the more important is a contract and a communication pipeline. This main and WCF framework
is related to the programming model and the inverse sequence speech mechanism. Because WCF emphasizes the concept of contract and the binding protocol, this directly determines the channel type of communication between client and server. You can see it in this file, too. In addition, there are service requests and corresponding information. Follow the rules of the WCF Service framework.

http://social.msdn.microsoft.com/Forums/zh-CN/wcfzhchs/thread/6bb53cc3-142d-462f-8c70-1d75407f4973

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.