462 Chapter 10 • Web Services
create a Web Reference, these classes find the .vsdisco files that describe Web Services.
Disco file from our Hello World example:
<?xml version="1.0" encoding="utf-8"?>
<discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/disco/">
<contractRef
ref="http://localhost/WebApplication_HelloWorld/hello.asmx?wsdl"
docRef="http://localhost/WebApplication_HelloWorld/hello.asmx"
xmlns="http://schemas.xmlsoap.org/disco/scl/" />
</discovery>
The System.Web.Services.Protocols Namespace
The System.Web.Services.Protocols namespace consists of the classes used to define the protocols that enable message transmission over HTTP between ASP.NET Web Services and ASP.NET Web Service clients.These classes are used in our WSDL proxy classes.They are mostly involved with the formatting, bindings, and settings of the SOAP message.
WSDL proxy from our Hello World example:
namespace WebApplication_HelloWorld.localhost { using System.Diagnostics;
using System.Xml.Serialization; using System;
using System.Web.Services.Protocols; using System.Web.Services;
[System.Web.Services.WebServiceBindingAttribute(Name="helloSoap",
Namespace="http://tempuri.org/")]
public class hello : System.Web.Services.Protocols.SoapHttpClientProtocol {
[System.Diagnostics.DebuggerStepThroughAttribute()] public hello() {