Generates a WebService. cs file based on the WSDL

Source: Internet
Author: User
Tags wsdl
There are two ways to call WebService:

1. Introduce Web services published in a location to the project directly in the VS IDE via Web references. This way basically will be used vs.net people will.
2. Create the Service proxy class (*.cs) and the Dynamic Library (*.dll) file by using the VS Command Prompt window, and then include the resulting file into the project by reference in VS.

Specific methods:
Open the Microsoft Visual Studio 2005->visual Studio tools->visual Studio 2005 Command Prompt window.
Input: WSDL Ws_file?wsdl/out:webclient.cs can generate proxy class (Ws_file is your webservice Url,webclient.cs is your proxy file name),
The default save path is C:/Program files/microsoft Visual Studio 8/vc/wdstest.cs. Generate the proxy file with the above command, and then build the DLL with Csc/t:library WebClient.cs.

Open the command prompt with the VS comes in and enter directly under VC:

Wsdl/n:xx/out:web.cs http://192.168.0.222/WebSite/Service.asmx? Wsdl

This will generate the Web.cs file you want in the VC folder under Install Vs folder. Note:/n is followed by the namespace of the webserver that you created.

Generates a WebService. cs file based on the WSDL

Related Article

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.