2

So I have two wsdl files (xml based) and I need to use them to consume a web service. Not sure where to start? I'm trying to add them in my Visual Studio Project Solution by clicking on "Add Service Reference" but I need an URL.

Should I add them to a Virtual Directory? If so, how?

Thanks in advance

4

5 回答 5

3

You already found the solution. Use the "Add Service Reference" dialog and make sure your service is accessible by a URL. To do this either request the URL by the people offering the service or deploy the service in IIS.

Personally I would forget about svcutil.exe. If you have Visual Studio, it is much easier to add and update the service reference using the excellent integration of web services in Visual Studio.

于 2012-11-15T22:19:12.657 回答
2

You can use the wsdl.exe tool which comes with Visual Studio (in there you can specify a local file path to your wsdl file) -

http://msdn.microsoft.com/en-us/library/d2s8y7bs(VS.100).aspx

于 2012-11-15T22:15:47.583 回答
2

Add your .wsdl address in address and click Go button.your service is add in your project.

enter image description here

于 2018-01-06T08:19:51.860 回答
1

You can add a service reference by using the path to the wsdl files.

于 2012-11-15T22:16:09.697 回答
1

You can use svcutil.exe as such:

svcutil.exe /language:cs /out:MyServiceProxy.cs /config:app.config c:\path\to\my.wsdl

于 2012-11-15T22:17:36.597 回答