6

I have a few Wcf service library projects (not Wcf service application) in my solution. I have to give the .wsdl files of the projects to my collegue who will consume the services.

How can I do that?

Thanks in advance,

xkcd
  • 2,538
  • 11
  • 59
  • 96

2 Answers2

12

You can use the WCF Service Host to start a new instance of your service, and then add ?wsdl to the service address to access the wsdl (http://localhost:1234/MyService.svc?wsdl for instance).

WcfSvcHost's syntax is the following:

WcfSvcHost.exe /service:<PathToServiceDLL> /config:<PathToServiceConfig>
vc 74
  • 37,131
  • 7
  • 73
  • 89
  • How to generate WSDL for Service which has only one method. And that method is POST. Moreover, that method takes String and Stream as parameters. When I paste "?wsdl" it gives me an exception "System.InvalidOperationException: ..... must have single parameter whose type is Stream...." – Faizan Mubasher Jan 08 '14 at 05:48
2

Follow these steps:

  1. Go to IIS add new application under the default web site.(alias:test physicalPath: c:\test), dont press test connection
  2. On your wcf project right click and run publish choose your new application on IIS.
  3. Goto IIS to test application, right click on the svc file and browse - its open IE.
  4. On the url address on the IE add to the address ?wsdl. and ENTER it.

good luck

Uğur Aldanmaz
  • 1,018
  • 1
  • 11
  • 16
Ziv.Ti
  • 609
  • 7
  • 10