Analysis of using Wsdl.exe to generate WebService proxy class

Source: Internet
Author: User
Tags visual studio 2010 wsdl

using Wsdl.exe to generate the WebService proxy class :
Generates the WebService proxy class based on the provided WSDL
1. Start-Up Program->visual Studio 2010 Command Prompt
2. Enter the following red marking section
D:/program files/microsoft Visual Studio 8/vc>wsdl/language:c#/n:testdemo/out:d:/temp/testservice.cs D:/Temp/ testservice.wsdl
A TestService.cs file will be generated under the D:/temp
Note: D:/TEMP/TESTSERVICE.WSDL is a WSDL path, which 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 >-
A URL or path that points to a WSDL contract, XSD schema, or. discomap document.
/nologo
Cancels the display of the copyright flag.
/language:<language>
The language of the proxy class used for the build. Please from "CS", "VB", "JS", "VJS",
"CPP", or to implement System.CodeDom.Compiler.CodeDomProvider
Provides a fully qualified name for the class. The default language is "CS" (CSharp).
The abbreviated form 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.
Please use HTTP//URLs as command-line arguments to reference
Service, or create a discomap document for local files.

/verbose
Displays additional information when the/sharetypes switch is specified.
The abbreviated form is "/V".

/fields
Generates a field instead of a property. The abbreviated form is "/f".

/order
Generates an explicit order 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 namespace
As the global namespace. The abbreviated form is "/N:".

/out:<filename|directorypath>
The file name or directory path of the generated proxy code. The default file name is from
The service name is derived. The abbreviated form is "/O:".

/protocol:<protocol>
Override the default protocol to implement. Please choose from "SOAP", "SOAP12",
"HttpGet", "HttpPost" in the selection.

/username:<username>
/password:<password>
/domain:<domain>
The credentials that are used when connecting to a server that requires authentication.
The abbreviated form 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 the System proxy server settings.

/proxyusername:<username>
/proxypassword:<password>
/proxydomain:<domain>
The credentials that are used when connecting to a proxy server that requires authentication.
The abbreviated form is "/PU:", "/PP:" and "/PD:".

/appsettingurlkey:<key>
That is used in code generation to read the URL property.
The default value of the configuration item. The default is not from the configuration
Read in the file. The abbreviated form is "/urlkey:".

/appsettingbaseurl:<baseurl>
Base URL to use when calculating URL segments.
You must also specify the appSettingUrlKey option. The URL segment is
Calculate 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 in a format similar to the format reported by the compiler.

Advanced

/server
The server switch has been deprecated. Please use/serverinterface instead.
Implement for XML Web Services using contract-based ASP.
Generates an abstract class. By default, the client agent is generated
Class.

/serverinterface
Build for the server-side implementation of an ASP. NET Web Service
Interface. will be generated for each binding in the WSDL document
An interface. WSDL implements the WSDL contract separately (implementing
The class of an interface should not include any of the following on a class method:
Changing the Web service properties or serialization of a WSDL contract
property). The abbreviated form is "/SI".

/parameters:<file>
Reads command-line options from the specified XML file. This will
Specifies options that are not available on the command line, such as selecting
The type of asynchronous programming model that is generated. For more information,
See the documentation for your tool. The abbreviated form is "/par:".

Analysis of using Wsdl.exe to generate WebService proxy class

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.