A method of automatically generating WebService proxy classes by WSDL

Source: Internet
Author: User
Tags wsdl

It is often necessary to manually generate a WebService proxy class that requires a sentence to be generated, such as Wsdl.exe/l:cs/out:d:\proxy_updateservice.cs http://localhost:1101/ Updateservice.asmx? wsdl Copy to the Visual Studio 2005 Command Prompt window to execute, and here is another way to do this.

Open Visual Studio 2005 First, choose Menu Tools-External tools to open the External Tools dialog box,

, click the Add button to add a new tool, enter the WSDL generation agent class in the title row, and enterC:\Program Files\Microsoft Visual Studio 8\sdk\v2.0\bin\ in the command line. Wsdl.exe"(Path to the Wsdl.exe file), enter"/l:cs/out:"In the Parameters row, click the Triangle button to the right of the" Initial Catalog "row to select" Item Directory ", tick" use Output Window "and" Prompt for parameters ", and then confirm the save.

Then open the menu "tools" to see a "WSDL Generation proxy class" menu, then select a folder to hold the generated proxy class (must be located and included in the current solution), and then click on the "WSDL Generation Agent Class" menu, pop up the following dialog box

, and then you just need to "/l:cs/out:" After empty one box (must be empty one) and then paste WebService file HTTP address such as http://localhost:4478/UpdateService.asmx? WSDL, click OK to see what happened? Yes, the Output window will show the generated class and its location to see if the folder you selected

, find this path to see if there is a class, and you will find that this class is exactly the same as the class generated by the command line above, and the individual feels it is easier to do so.

A method of automatically generating WebService proxy classes by WSDL

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.