Create web service proxy in Visual Studio from a WSDL file

前端 未结 7 1911
别跟我提以往
别跟我提以往 2020-11-29 17:24

My application needs to talk to a web service that hasn\'t got an online WSDL definition. The developers however supplied me with a WSDL file.

With a public WSDL Vis

相关标签:
7条回答
  • 2020-11-29 18:05

    Since the true Binding URL for the web service is located in the file, you could do these simple steps from your local machine:

    1) Save the file to your local computer for example:

    C:\Documents and Settings\[user]\Desktop\Webservice1.asmx
    

    2) In Visual Studio Right Click on your project > Choose Add Web Reference, A dialog will open.

    3) In the URL Box Copy the local file location above C:\Documents and Settings[user]\Desktop\Webservice1.asmx, Click Next

    4) Now you will see the functions appear, choose your name for the reference, Click add reference

    5) You are done! you can start using it as a namespace in your application don't worry that you used a local file, because anyway the true URL for the service is located in the file at the Binding section

    0 讨论(0)
提交回复
热议问题