© 2004 Microsoft Corporation. All rights reserved.

Figure 2 Specifying the Location of a Static WSDL
  using System;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;
using System.Xml.Schema;
[WebService(Name="GeometryService",Namespace="urn:geometry")]
[WebServiceBinding(Name="GeometrySoapBinding", 
  Namespace="urn:geometry", Location="GeometryService.wsdl")]
public class GeometryServiceImpl : GeometryService
{
    [WebMethod()]
    [SoapDocumentMethod("urn:geometry#CalcDistance", 
      Binding="GeometrySoapBinding")]
    [return: XmlElement("return", 
      Form=XmlSchemaForm.Unqualified)]
    public override double CalcDistance(
    [XmlElement(Form= XmlSchemaForm.Unqualified)] Point dest,    
    [XmlElement(Form= XmlSchemaForm.Unqualified)] Point orig
    )
    {
        return Math.Sqrt(Math.Pow(dest.x-orig.x, 2) + 
                           Math.Pow(dest.y-orig.y, 2));
    }
}

Figure 3 JIT-Compiled HTTP Endpoints

File Type
ASP.NET Directive
Codebehind
Src
Description
.ashx
@WebHandler
No
No
Used with IHttpHandler-derived classes
.asmx
@WebService
Yes
No
Used with WebMethod-based classes
.aspx
@Page
Yes
Yes
Used with Page-derived classes