(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