There are three methods to generate WSDL in. Net:
1. Add the wdsl requirement after the URL of the Web Service, as follows:
Http: // localhost/webexamples/simpleservice. asmx? WSDL
2.use disco.exe. Write the following command in the command line:
Disco http: // localhost/webexamples/simpleservice. asmx
3. Use the class provided in the namespace system. Web. Services. Description
The root element of each WSDL file is <definitions>, which must provide a complete description of the service. First, declarations of various namespaces must be provided in the <definitions> element.
The <definitions> element contains one or more <porttype> elements, each of which is a series of operations. You can think of a single porttype element as a logical grouping of classes composed of various methods. Each types should be called a service, so the entire WSDL file will become a service set.
There can be several methods or operation in each service. WSDL references them through the <operation> element.
The following is a simple WSDL example.
<? XML version = "1.0" encoding = "UTF-8"?>
<Definitions name = "mobilephoneservice"
Targetnamespace = "www.mobilephoneservice.com/mobilephoneservice-interface"
Xmlns = "http://schemas.xmlsoap.org/wsdl"
Xmlns: Soap = "http://schemas.xmlsoap.org/wsdl/soap"
Xmlns: TNS = "http://www.mobilephoneservice.com/MobilePhoneService"
Xmlns: XSD = "http://www.w3.org/1999/XMLSchema">
<Porttype name = "mobilephoneservice_port">
<Operation name = "getlistofmodels">
.......
.......
</Operation>
<Operation name = "getprice">
.......
.......
</Operation>
</Porttype>
</Definitions>