What is the difference between adding a Web reference and adding a service reference,
What is the difference between add Service References and add Web References?
Reference
Http://social.microsoft.com/Forums/zh-CN/xmlwebserviceszhchs/thread/808d870b-49f1-47ac-b105-4beb580bcec6
(1) the functionality of the Add Web Reference (add Web service Reference) provided in VS2005 is primarily to add a Web services Reference.
(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 After upgrade in order to support the WCF Service Library on The. NET Framework version 3.0 or 3.5. Added the Add service Reference (added Services Reference) Feature. Framework3.0 or 3.5 is Available.
What you said, I did my own experiment, and there is a project type of Add service Reference, Add Web Reference, which is a Web service Program. Includes a Web service Project. The common console type is no add Web Reference.
I carefully compared the two ways to add the same WebService generated client file Reference.cs, there are Differences.
1. The main add-on has a process to get the service metadata that deserializes the session local class File. The structure is basically similar. contain files such as Wsdl\discovery.
This is also related to the core industry standards that WCF service supports for web Service. One of the features of wcf, after all, is the compatibility of Web service Features.
2. Different places when the add Web Reference generated in the Reference.cs file contains a service proxy class, He is responsible for communicating with the Web service, which inherits a soap class, using the SOAP protocol, the SOAP Simple Object access protocol, based on the XML language. It also contains the methods defined in the Web service classes, and the associated asynchronous invocation methods and Events. Adhere to the primary rules for. NET Web Service.
The client file Reference.cs generated by the 3.ADD Service Reference. I looked at it, and this also deserializes a local proxy class, very similar to the Former. But in addition to the service class and some other classes and contractual interfaces related to it. One of the more important is a contract and a communication pipeline. This primary and WCF framework
Relationship between the programming model and the anti-serialization session Mechanism. Because WCF emphasizes the concept of contracts and the binding protocol, this directly determines the channel type of client and server Communication. You can see it in this file as Well. In addition, there are service requests and corresponding Information. Follow the rules for the WCF service Framework.
——————————————————————————–
A project type that has both the Add Service Reference, Add Web Reference, and both is a Web service Program. Includes a Web service Project. The common console type is no add Web Reference.
can be Add Web Reference, console type project in the Add Service Reference window has an advanced button, which can still choose Add Web Reference. I think Microsoft recommends using the Add Service Reference, but retains the add Web Reference to maintain Compatibility.
I tested this way using the Add Web reference to add a WCF service
What is the difference between adding a Web reference and adding a service reference?