3

Im am currenty working on some changes to a webservice (written in C# and VS). Now that most changes are done I need to generate myself a WSDL from the webservice so I can Import the WSDL on my other application to make the changes there.

The problem is that I have no clue how to generate the WSDL. Hope someone can help me out.

VIP
  • 89
  • 2
  • 9
  • possible duplicate of [How to get the wsdl file from a webservice's URL](http://stackoverflow.com/questions/20742589/how-to-get-the-wsdl-file-from-a-webservices-url) – Liam Nov 26 '14 at 14:58
  • webservicename **?wsdl** – Liam Nov 26 '14 at 14:58
  • If its a WCF or asmx SOAP service the WSDL will be automatically generated if you access the service url with `?swdl` e.g. `http://yoursite/someservice.svc?wsdl` – Ben Robinson Nov 26 '14 at 14:59

2 Answers2

2

Run the webservice and open it in a browser. Append "?wsdl" to the url, eg.:

http://localhost:524123/MyWebServeice?wsdl

You now have the wsdl document in your webbrowser. Now you can copy / paste.

FirstHorizon
  • 118
  • 1
  • 11
0
"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 if you need to devlop "offline"

mr R
  • 997
  • 2
  • 12
  • 25