Wsdl.exe generate WebService proxy class

Source: Internet
Author: User
C: \ Program Files \ Microsoft Visual Studio 9.0 \ Vc>

WSDL/N: testwebservice/O: C: \ temp \ testmyservices. cS http: // localhost/mywebservice/service1.asmx? WSDL

Or

WSDL/language: CS/N: testdemo/out: D: \ temp \ testservice. Cs D: \ temp \ testservice. WSDL 

 

1./N: namespace

2./O: output directory

3. URL or file physical directory

 

ClassProgram

{
Static   Void Main ( String [] ARGs)
{
Service1 SVS =   New Service1 ();

SVS. subtractcompleted+ =   New Subtractcompletedeventhandler (svs_subtractcompleted );
SVS. subtractasync ( 1.1 , 2.2 );
// Double DREs = SVS. Subtract (1.1, 2.2 );
// Console. writeline ("WebService Result:" + DREs );
For ( Int I =   0 ; I <   10 ; I ++ )
{
Console. writeline (I. tostring ());
System. Threading. thread. Sleep ( 20 );
}
Console. readkey ();
}
Static   Void Svs_subtractcompleted ( Object Sender, subtractcompletedeventargs E)
{
Console. writeline ( " WebService asynchronous call result: "   + E. Result. tostring ());
}
}

 

 

Wsdl.exe-

Using ASP. NET, according to the WSDL protocol file, XSD architecture, and. discomap

The document is generated for the XML Web Services Client and XML Web Services.

Code. This tool can be used with disco.exe.

Wsdl.exe <option> <URL or path>...

-Option-

<URL or path>-

The URL or path pointing to the WSDL protocol, XSD architecture, or. discomap document.

/Nologo

Undisplay the copyright logo.

/Language: <language>

The language used to generate the proxy class. Please refer to "CS", "VB", "JS", "vjs ",

Select "CPP" or implement system. codedom. compiler. codedomprovider

Class provides a fully qualified name. The default language is "Cs" (CSHARP ).

The abbreviation is "/L :".

/Sharetypes

Enable the type sharing function. This function is shared between different services.

(The namespace, name, and network signature must be the same)

Create a code file with a single type definition.

Use http: // URLs as a command line parameter to reference

Service, or create a discomap document for a local file.

/Verbose

Additional information is displayed when/sharetypes is enabled.

The abbreviation is "/V ".

/Fields

Generate fields rather than attributes. The abbreviation is "/F ".

/Order

Generates an explicit sequence identifier for a particle member.

/Enabledatabinding

Implement the inotifypropertychanged interface on all generated types,

To enable data binding. The abbreviation is "/EDB ".

/Namespace: <namespace>

The generated proxy or template namespace. Default namespace

Is a global namespace. The abbreviation is "/N :".

/Out: <FILENAME | directorypath>

The name or directory path of the generated proxy code. The default file name is from

Derived from the service name. The abbreviation is "/O :".

/Protocol: <protocol>

Rewrite the default protocol to be implemented. Refer to "Soap", "soap12 ",

Select from "httpget" and "httppost.

/Username: <username>

/Password: <password>

/Domain: <domain>

The Credential used to connect to the server that requires authentication.

The abbreviations are "/u:", "/P:", and "/D :".

/Proxy: <URL>

The URL of the proxy server used to process HTTP requests.

The default setting is to use the system proxy server.

/Proxyusername: <username>

/Proxypassword: <password>

/Proxydomain: <domain>

The Credential used to connect to the proxy server that requires authentication.

The abbreviations are "/PU:", "/PP:", and "/PD :".

/Appsettingurlkey: <key>

The

The default configuration item. The default value is non-slave configuration.

File. The abbreviation is "/urlkey :".

/Appsettingbaseurl: <baseurl>

The base URL used to calculate the URL segment.

You must also specify the deleettingurlkey option. The URL segment is

Calculated from appsettingbaseurl

The result of the relative URL of the URL in the WSDL document. The abbreviation is "/baseurl :".

/Parsableerrors

Output Error. The format is similar to that reported by the compiler.

-Advanced-

/Server

The server switch has been rejected. Use/serverinterface instead.

Implement XML Web Services using protocol-based ASP. NET

Generate abstract classes. By default, a client proxy is generated.

Class.

/Serverinterface

Generate for the server side of ASP. NET Web Service

Interface. Will be generated for each binding in the WSDL document

One interface. Separate Implementation of the WSDL protocol (Implementation

The class of the interface should not include any of the following items in the class method:

Modify web service attributes or serialization of the WSDL Protocol

Attribute ). The abbreviation is "/Si ".

/Parameters: <File>

READ command line options from the specified XML file. In this way, you can

Specifies options that cannot be used in the command line. For example, select

Type of the generated asynchronous programming model. For more information,

See the tool documentation. The abbreviation is "/PAR :".

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.