Web Services Description Language Tool (Wsdl.exe)
The Web Services Description Language tool generates code for XML Web services and XML Web service clients from WSDL contract files, XSD schemas, and .discomap discovery documents.
wsdl [options] {URL | path}
or
/urlkey:key
Specifies the configuration key to use in order to read the default value for the URL property when generating code.or
/baseurl:baseurl
Specifies the base URL to use when calculating the URL fragment. The tool calculates the URL fragment by converting the relative URL from the baseurl argument to the URL in the WSDL document. You must specify the /appsettingurlkey option with this option.or
/pd:domain
Specifies the domain to use when connecting to a proxy server that requires authentication.or
/pp:password
Specifies the password to use when connecting to a proxy server that requires authentication.or
/pu:username
Specifies the user name to use when connecting to a proxy server that requires authentication.Remarks
A .wsdl file is an XML document written in an XML grammar called Web Services Description Language (WSDL). This file defines how an XML Web service behaves and instructs clients as to how to interact with the service.
You can obtain discovery documents for an XML Web service using the Web Services Discovery Tool (Disco.exe). The .discomap, .disco, .wsdl, and .xsd files produced by this tool can be used as input to Wsdl.exe.
When you use Wsdl.exe to create a proxy class, a single source file is created in the programming language that you specify. In the process of generating the source code for the proxy class, the tool determines the best type to use for objects specified in the service description. In some cases the tool uses a least-common-denominator approach for casting objects to a type. As a result, the generated type in the proxy class might not be what the developer wants or expects. For example, when Wsdl.exe encounters an ArrayList type in a service description, it creates an Object Array in the generated proxy class. To ensure correct object type casts, open the file containing the generated proxy class and change any incorrect object types to the expected object type.
Examples
The following command creates a .wsdl file for the XML Web service located at the specified URL and creates a client proxy class in the C# language for the XML Web service.
wsdl http://hostServer/WebserviceRoot/WebServiceName.asmx?WSDL
The following command creates a client proxy class in the C# language for an XML Web service located at the specified URL. The tool saves the client proxy class in the file myProxyClass.cs.
wsdl /out:myProxyClass.cs http://hostServer/WebserviceRoot/WebServiceName.asmx?WSDL
The following command creates a client proxy class in the Microsoft Visual Basic language for an XML Web service located at the specified URL. The tool saves the client proxy class in the file myProxyClass.vb.
wsdl /language:VB /out:myProxyClass.vb http://hostServer/WebserviceRoot/WebServiceName.asmx?WSDL
See Also
.NET Framework Tools | Web Services Discovery Tool (Disco.exe) | Creating an XML Web Service Proxy | XML Web Service Description | XML Web Services Overview

