using Wsdl.exe to generate WebService proxy classes:
Generate the WebService proxy class based on the WSDL provided
1. Start-> program->visual Studio 2005 Command Prompt
2, enter the following red mark part
D:/program files/microsoft Visual Studio 8/vc> wsdl/language:c#/n:testdemo/out:d:/temp/testservice.cs d:/temp/testservice.wsdl
in d:/ A TestService.cs file is generated under Temp
Note: d:/temp/testservice.wsdl is a WSDL path and can be a URL path: http://localhost/Temp/ TEST.ASMX?WSDL
wsdl parameter description:
wsdl.exe < options > <url or Path > <url or Path > ...
-Options-
<url or Path >-
point to WSDL contract, XSD schema, or. discomap The URL or path of the file.
/nologo
Suppresses the display of the copyright banner.
/language:<language>
The language of the proxy class used for the build. Please select from CS, VB, JS, VJs,
CPP, or implement System.CodeDom.Compiler.CodeDomProvider
. The class provides a fully qualified name. The default language is "CS" (CSharp). The
abbreviation is "/L:".
/sharetypes
Open the Type sharing feature. This feature is shared between different services
The same type (namespace, name, and network signature must be the same)
Create a code file with a single type definition.
Use the http://URL as a command-line argument to refer to the
Service, or create a discomap document for your local file.
/verbose
Displays additional information when specifying the/sharetypes switch.
The abbreviation is "/V".
/fields
Generate a field instead of a property. The abbreviation is "/F".
/order
Generates an explicit sequential identifier for a particle member.
/enabledatabinding
Implement the INotifyPropertyChanged interface on all generated types,
To enable data binding. The abbreviated form is "/edb".
/namespace:<namespace>
The namespace of the generated proxy or template. Default namespaces
to the global namespace. The abbreviation is "/N:".
/out:<filename|directorypath>
The file name or directory path of the generated proxy code. The default filename is from
Derived from the service name. The abbreviation is "/o:".
/protocol:<protocol>
Overrides the default protocol to implement. From "SOAP", "SOAP12",
"HttpGet", "HttpPost" in the selection.
/username:<username>
/password:<password>
/domain:<domain>
Credentials to use when connecting to a server that requires authentication.
The abbreviation is "/u:", "/P:", and "/d:".
/proxy:<url>
The URL of the proxy server that is used to process the HTTP request.
The default is to use System proxy server settings.
/proxyusername:<username>
/proxypassword:<password>
/proxydomain:<domain>
The credentials to use when connecting to a proxy server that requires authentication.
The abbreviation is "/PU:", "/PP:" and "/PD:".
/appsettingurlkey:<key>
Used to read the URL property in code generation.
The configuration item for the default value. Default is not from configuration
The file is read in. The abbreviated form is "/urlkey:".
/appsettingbaseurl:<baseurl>
The base URL to use when calculating the URL segment.
You must also specify the appSettingUrlKey option. The URL segment is
Calculation from appSettingBaseUrl
The result of the relative URL of the URL in the WSDL document. The abbreviated form is "/baseurl:".
/parsableerrors
The output error is the same format as the compiler report.
High
/server
The server switch has been deprecated. Please use/serverinterface instead.
Implement asp.net for Xml Web Services using a protocol based
Generates an abstract class. By default, the client proxy is generated
Class.
/serverinterface
Server-side implementation generation for ASP.net Web services
Interface. will be generated for each binding in the WSDL document
An interface. WSDL implements the WSDL contract separately (implements the
The class of an interface should not include any of the following items on the class method:
To change the Web service properties or serialization of a WSDL contract
Properties). The abbreviated form is "/SI".
/parameters:<file>
Reads command-line options from the specified XML file. This will
Specifies options that cannot be used on the command line, such as selecting
The generated asynchronous programming model type. For more information,
See tools documentation. The abbreviated form is "/par:".