neeraj
neeraj

Reputation: 345

How to generate a WSDL file of a web service in Visual Studio

I have inventory application in .NET which is going interoperate with Salesforce.

How to generate WSDL file of a web service, I was told that Visual Studio automatically create it and also told that it was not created physically if it is then how to export it to remote machine to access if WSDL.exe command do it with asmx file, what is the exact location where it should be fired.

Please suggest If i am missing any link.

Upvotes: 12

Views: 72178

Answers (3)

mr R
mr R

Reputation: 1126

"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\wsdl.exe" /language:CS /namespace:YourNameSpace /out:"G:\Work\YourFileName.cs" http://localhost/Service.asmx?wsdl

This should generate .cs (c#) file.

Upvotes: 0

Jeff Magill
Jeff Magill

Reputation: 69

When viewing in a browser, View Source to get rid of the collapsible elements. Then copy/paste that into your favorite XML viewer/formatter if you want something legible.

Upvotes: 1

Prahlad Yeri
Prahlad Yeri

Reputation: 3653

Nothing special needs to be done to generate the WSDL to your webservice. Just postfix your Webservice url with "?WSDL" and you will get it. For example:

http://localhost/HelloService.asmx?WSDL

Once you do that, save the WSDL as an XML file and add it as web-reference to your client .NET application where you want to call it.

Upvotes: 35

Related Questions